You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
fulstadev
changed the title
Automate addition of flavor-specific icon resources
Automate addition of flavor-specific icon resources in Android
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 withinandroid/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.
The text was updated successfully, but these errors were encountered: