Flutter app icons and splash screen

App Icons

To generate icons for flutter app we have a nice package call flutter_launcher_icons. We can use it for generate icons.

To add this package go to pubspec.yaml file

dev_dependencies:
  flutter_launcher_icons: "^0.8.0"

flutter_icons:
  android: "launcher_icon"
  ios: true
  image_path: "assets/icon/icon.png"

Make sure you have such a .png in your assets folder.

And also for to target new android you can add these features to your punspect.yaml

dev_dependencies:
  flutter_launcher_icons: "^0.8.0"

flutter_icons:
  android: "launcher_icon"
  ios: true
  image_path: "assets/icon/icon.png"
  adaptive_icon_background:"#ffffff"
  adaptive_icon_foreground:"assets/icon/adaptive_icon.png"

Make sure to have adaptive_icon.png for your app too. Then you can see bunch of drawable files in the #android/app/src/main/res location.

splash screen

Navigate to #android/app/src/main/res/drawble/launch_background.xml and add this item tag.

 <item>
        <bitmap
            android:gravity="center"
            android:src="@drawable /launch_image" />
 </item>

Also you can customize the color of the splash screen using another item tag like this.

<item android:drawable="@android:color/black" />

you can add own tag.

Now you can see nice splash screen and icons to your app.