Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate addition of flavor-specific icon resources in Android #626

Open
fulstadev opened this issue Jan 10, 2025 · 0 comments
Open

Automate addition of flavor-specific icon resources in Android #626

fulstadev opened this issue Jan 10, 2025 · 0 comments

Comments

@fulstadev
Copy link

fulstadev commented Jan 10, 2025

When I have flutter flavours in my project, e.g. defined in a:

flutter_launcher_icons-prod.yml

file for the prod flavour, and then run the command:

flutter pub get
dart run flutter_launcher_icons -f flutter_launcher_icons-prod.yml

both according to your docs, the according icon files are generated within the android/app/src/main/res folder, which is the folder of the main sources, applied to both flutter flavors.

As the purpose of flutter flavors is to be able to compile two distinct versions of your flutter app with a single command, it would be handy if, at least for android, the flutter_launcher_icons -f command would insert the generated files within android/app/src/{flavorname}/res instead, as that's generally how you specify flavor-specific resources.

At the moment, you have to run the command and each time manually copy-paste all the generated files into the respective flavor resource folder for android. And that must be done one after the other, for every single flavor, as running the command twice with two distinct flavor config files overwrites the previous state of files in the same android/app/src/main/res folder.

It's a small detail, but the current state kind of acts against the generation of a flavor-specific app with a single command in a fully automated fashion.

@fulstadev fulstadev changed the title Automate addition of flavor-specific icon resources Automate addition of flavor-specific icon resources in Android Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant