fluttercommunity / fluttercommunity/flutter_launcher_icons
[FEATURE REQUEST][POSSIBLE BUG] Flavors - Ability to Specify Android and iOS Output Path as well as Image Name
- Dominant language
- Dart
- Stars
- 2.1k
- Forks
- 426
- PR merge metrics
- No merged PRs in 30d
Description
### :speech_balloon: Description
In my implementation of flavors (which I doubt is unique to me), in android I have separate 'res' folders (containing the mipmap folders) for 'dev' and 'prod'.
'dev' has the following path: `"/android/app/src/dev/res"` in Windows.
'prod' uses the 'res' folder in 'main'.
I typically use the same launch icon name for dev and prod and my build process sorts out which 'res' folder to use for the launch icons when I build for dev or prod.
I had assumed that I would simply be able to provide the path to 'res' together with the icon name as the 'android;' or 'iOS:' attribute - in fact the README.MD suggests I can...
> Android
>
> android
> true: Override the default existing Flutter launcher icon for the platform specified
> false: Ignore making launcher icons for this platform
> icon/path/here.png: This will generate a new launcher icons for the platform with the name you specify, without removing the old default existing Flutter launcher icon.
>
However, when I try to add this as the android: attribute `android: "android/app/src/dev/res/launcher_icon"` I get the following error message:
> ✗ ERROR: InvalidAndroidIconNameException
> The icon name must contain only lowercase a-z, 0-9, or underscore: E.g. "ic_my_new_icon"
> pub finished with exit code 2
It even gives this error if I add the '.png' to just the icon name, which is at odds with what your README.MD states above.
Am I doing something wrong i.e. should it work, is it a bug, or is it a missing feature? If it is the former then I would ask that the READ.ME be updated to show an example of using the path in the android and iOS attributes, and also to not say that '.png' can be used in the ican name.
Thanks a lot.
### :question: Platform
I would suggest it is applied to all platforms, however, selfishly I only need it for Android ans iOS. :-)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with README.md's Android attribute documentation and trace the validation that raises InvalidAndroidIconNameException for a path or .png name. Determine the intended behavior for specifying output paths and image names on Android and iOS, then verify that the documented configuration and generated launcher icons match that behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, dart, ios
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100