We use flutter_launcher_icons package to generate app icons for both platforms android and ios.
1- replace assets/icons/app-icon.png
and assets/icons/app-icon-staging.png
with the new app icons for both flavors.
2- run this command to generate production & staging flavor icons
flutter pub run flutter_launcher_icons:main -f flutter_launcher_icons.yaml
3- for android only
- open
android/app/src/production/res/mipmap-anydpi-v26
andandroid/app/src/staging/res/mipmap-anydpi-v26
- add inset with 24% to foreground element for both files
- <foreground android:drawable="@drawable/ic_launcher_foreground" />
+ <foreground>
+ <inset
+ android:drawable="@drawable/ic_launcher_foreground"
+ android:inset="24%" />
+ </foreground>
4- run the app to make sure the launcher icon are updated correctly (you need to stop it first hot restart not enough).
5- commit changes.
We use flutter_native_splash package to generate native splash screen images and files configrations for both platforms android and ios.
1- replace assets/images/splash-logo.png
and assets/icons/splash-logo-staging.png
with the new app logo for both flavors.
2- update color proprety on flutter_native_splash-production.yaml
and flutter_native_splash-staging.yaml
files with the new app splash background color for both flavors.
2- run this command to generate production flavor native splash screen proprties
flutter pub run flutter_native_splash:create --flavor production
3- run this command to generate staging flavor native splash screen proprties
flutter pub run flutter_native_splash:create --flavor staging
4- run the app to make sure the native splash screen are updated correctly (you need to stop it first hot restart will not enough).