Customization & Changes
App Icon Change
1. Prepare App Icon
1. Create an app icon image in a square format (e.g., 1024x1024 pixels).
2. Use an image editing tool like Photoshop, GIMP, or an online tool to design your icon.
3. Save the icon in a format such as .png.
2. Add the flutter_launcher_icons Package
Add the following dependency to your pubspec.yaml file:
dev_dependencies:
flutter_launcher_icons: ^0.13.1
flutter_icons:
android: true
ios: true
image_path: "assets/icon/app_icon.png"
flutter_launcher_icons: ^0.13.1
flutter_icons:
android: true
ios: true
image_path: "assets/icon/app_icon.png"
- Replace "assets/icon/app_icon.png" with the path to your app icon file in your project.
3. Place the Icon in Your Project
1. Create an assets folder in your project directory if it doesn't exist.
2. Add your app icon image to theassets folder. For example:
assets/icon/app_icon.png
3. Update thepubspec.yaml file to include the assets folder:
flutter:
assets:
- assets/icon/
assets:
- assets/icon/
4. Generate App Icons
Run the following command in the terminal to generate app icons for Android and iOS:
flutter pub run flutter_launcher_icons:main
This will automatically create all necessary app icon sizes and replace the default icons in your Flutter project.