xxxxxxxxxx
dev_dependencies:
flutter_launcher_icons: ^0.8.1
flutter_icons:
android: true
ios: true
image_path: "assets/icon/icon.png"
then
cmd ->flutter pub run flutter_launcher_icons:main
xxxxxxxxxx
dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons: "^0.11.0"
flutter_icons:
android: "launcher_icon"
ios: true
image_path: "asset/icons/logo.png"
//after that run the following commands:
//flutter pub get
//flutter pub run flutter_launcher_icons:main
xxxxxxxxxx
Icon(
Icons.home,
color: Colors.blue,
size: 40.0,
textDirection: TextDirection.ltr,
semanticLabel: 'Icon', // Announced in accessibility modes (e.g TalkBack/VoiceOver). This label does not show in the UI.
),
xxxxxxxxxx
dev_dependencies:
flutter_launcher_icons: ^0.9.0
flutter_icons:
android: "launcher_icon"
ios: true
image_path: "assets/icon/icon.png"
/* command
flutter pub get
flutter pub run flutter_launcher_icons:main
*/
xxxxxxxxxx
// pubspec.yaml
// Add the following dependency in the 'dependencies' section
flutter_launcher_icons: ^x.x.x
// terminal
// Run the following command to generate the necessary files
flutter pub get
// pubspec.yaml
// Add the following lines at the end of the file or update if already present
flutter_icons:
android: true
ios: true
image_path: "assets/icon.png"
// terminal
// Run the following command to apply the new launcher icon
flutter pub run flutter_launcher_icons:main
xxxxxxxxxx
dev_dependencies:
flutter_launcher_icons: "^0.13.1"
flutter_launcher_icons:
android: "launcher_icon"
ios: true
image_path: "assets/icon/icon.png"
min_sdk_android: 21 # android min sdk min:16, default 21
web:
generate: true
image_path: "path/to/image.png"
background_color: "#hexcode"
theme_color: "#hexcode"
windows:
generate: true
image_path: "path/to/image.png"
icon_size: 48 # min:48, max:256, default: 48
macos:
generate: true
image_path: "path/to/image.png"
xxxxxxxxxx
# pubspec.yaml
flutter:
# ...
assets:
- images/app_icon.png
# ...
flutter_icons:
android: "launcher_icon"
ios: true
image_path: "images/app_icon.png"