Generate Android, iOS, and Web Favicon Icons for Flutter – Dart

Tiempo de lectura: 2 minutos

I have used flutter_launcher_icons to create the icons for my application.

  • First, add it to your pubspec.yaml file under dev_dependencies and then run flutter pub get
flutter_launcher_icons: "^0.13.1"
  • In your pubspec.yaml file, add a flutter_launcher_icons section to configure the icons you want to generate. Specify paths to the image files that will be used as a base for the icons.
flutter_launcher_icons:
  android: "launcher_icon"
  ios: true
  image_path: "assets/images/icono_512.png"
  min_sdk_android: 21 # android min sdk min:16, default 21
  web:
    generate: true
    image_path: "assets/images/icono_512.png"
    background_color: "#html
Copy code
Reading Time: < 1 minute

I have used flutter_launcher_icons to create the icons for my application.

  • First, add it to your pubspec.yaml file under dev_dependencies and then run flutter pub get
flutter_launcher_icons: "^0.13.1"
  • In your pubspec.yaml file, add a flutter_launcher_icons section to configure the icons you want to generate. Specify paths to the image files that will be used as a base for the icons.
flutter_launcher_icons:
  android: "launcher_icon"
  ios: true
  image_path: "assets/images/icono_512.png"
  min_sdk_android: 21 # android min sdk min:16, default 21
  web:
    generate: true
    image_path: "assets/images/icono_512.png"
    background_color: "#hexcode"
    theme_color: "#hexcode"
  • In the image_path section, you need to specify the path to the .png image you want to use as a reference for creating different sizes of icons in the application
  • Finally, execute the following command:
flutter pub pub run flutter_launcher_icons:main

I hope this helps, have a great day

Leave a Comment