I'm setting up native splash screen in flutter.
Problem :
I want to delete Flutter icon when app loads (on native level).
My AndroidManifest.xml
:
<application
android:label="@string/app_name"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
...
My styles.xml
:
<resources>
<style name="LaunchTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowBackground">@color/splash_background</item>
</style>
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
...
My colors.xml
:
<resources>
<color name="splash_background">#FFC0CB</color>
</resources>
Solution: You need to comment out this line in AndroidManifest.xml
file.
<application
android:label="@string/app_name"
android:name="${applicationName}">
<!-- android:icon="@mipmap/ic_launcher"> -->
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
...
And after you need to reload flutter dependencies:
flutter clean
flutter pub get