fluttercommunity / fluttercommunity/flutter_launcher_icons

Automate addition of flavor-specific icon resources in Android

Open
#626 0 comments 3 reactions 0 assignees View on GitHub
improvement
Dominant language
Dart
Stars
2.1k
Forks
426
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the documented commands using flutter_launcher_icons-prod.yml and inspect how generated files are placed under android/app/src/main/res. Determine how the flavor name should select android/app/src/{flavorname}/res without overwriting other flavors. Done means each flavor's generated resources are placed in its own Android resource directory through the command.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, dart, flutter
Domain
mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.