VeryGoodOpenSource / very_good_cli

A Very Good Command-Line Interface for Dart created by Very Good Ventures 🦄
http://cli.vgv.dev
MIT License
2.15k stars 186 forks source link

docs: document on updating the application icon on core and wear apps #768

Open renancaraujo opened 1 year ago

renancaraujo commented 1 year ago

Extracted from https://github.com/VeryGoodOpenSource/very_good_cli/issues/481

Description As defined by https://github.com/VeryGoodOpenSource/very_good_cli/issues/481 , people using our templates want to know how to update the application icons.

This card is about researching a step-by-step on how to perform this task, maybe using current tools such as Flutter laucher icons.

Then document the findings.

Salonikansal2 commented 10 months ago

assign please

Salonikansal2 commented 10 months ago

Here what i have tried to make it EASY to understand for a beginner .hope you like it @renancaraujo @alestiago

  1. Set Up the Configuration: Automatically generate a configuration file with this command:

flutter pub run flutter_launcher_icons:generate This creates a flutter_launcher_icons.yaml file in your project's root directory.

If you want to specify a custom configuration file name, use:

flutter pub run flutter_launcher_icons:generate -f

To override an existing config file, use the -o flag:

flutter pub run flutter_launcher_icons:generate -o

Alternatively, you can add your Flutter Launcher Icons configuration to your pubspec.yaml file. Here's an example configuration:

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 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 macos: generate: true image_path: "path/to/image.png"

  1. Run the Package:

After configuring, run the package with these commands:

flutter pub get flutter pub run flutter_launcher_icons

If you used a custom configuration file name, specify it like this:

flutter pub get flutter pub run flutter_launcher_icons -f Ensure your config file is located in the same directory as pubspec.yaml.

Attributes:

You can customize various attributes in the configuration file, such as the image path and specific settings for Android, iOS, web, Windows, and macOS platforms. Flavor Support:

If you have flavor support, create a configuration file for your flavor following the same format as the main configuration.

Troubleshooting:

If you encounter issues like color differences or image size problems, follow the troubleshooting guidance provided in the documentation . Be aware of potential compatibility issues with dependencies and resolve them accordingly.

alestiago commented 10 months ago

@Salonikansal2 thanks for adding the information, would you mind opening a Pull Request with the change so the team can review it?