31.11 Flutter App Icon

20240122

The flutter_launcher_icons package will do the hard work to generate icons for the different platforms (excluding linux). Essentially it modifies the various platform files with a newly supplied png file as the icon. Below is a record of what it changes, noting that the package is currently 9 months since it was last updated and some of these may not reflect the latest practise. It’s a great start and generally works.

To use this package add the following to pubspec.yaml:

dev_dependencies:
  flutter_launcher_icons: "^0.13.1"

And then

flutter_launcher_icons:
  android: true
  ios: true
  image_path: "assets/icon/icon.png"
  min_sdk_android: 21
  remove_alpha_ios: true
  web:
    generate: true
    image_path: "assets/icon/icon.png"
  windows:
    generate: true
    image_path: "assets/icon/icon.png"
    icon_size: 48
  macos:
    generate: true
    image_path: "assets/icon/icon.png"

Then:

flutter pub get
dart run flutter_launcher_icons


Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0