fluttercommunity / fluttercommunity/flutter_launcher_icons
New scheme for flutter_icons_config.yaml file
- Dominant language
- Dart
- Stars
- 2.1k
- Forks
- 426
- PR merge metrics
- No merged PRs in 30d
Description
Hi @'MarkOSullivan94, @'bradintheusa
I am thinking about restructuring flutter_icons_config.yaml format
current config
```yaml
flutter_icons:
image_path: "assets/images/icon-128x128.png"
image_path_android: "assets/images/icon-710x599-android.png"
image_path_ios: "assets/images/icon-1024x1024.png"
android: true # can specify file name here e.g. "ic_launcher"
ios: true # can specify file name here e.g. "My-Launcher-Icon"
adaptive_icon_background: "assets/images/christmas-background.png" # only available for Android 8.0 devices and above
adaptive_icon_foreground: "assets/images/icon-foreground-432x432.png" # only available for Android 8.0 devices and above
# if I add support for web
web: true
image_path_web: "path/to/web.png"
background_color_web: "#hexcolor"
theme_color_web: "#hexcolor"
# if we add support for linux
linux true
image_path_linux: "path/to/image.png"
#if we add support for windows
windows: true
image_path_windows: true
# ... and so on with other platforms
```
My suggestion
```yaml
image_path: "path/to/image.png" # fallback if not specified for platform
android:
generate: true # specifies weather to generate icons for this platform or not
image_path: "path/to/image.png"
adaptive_icon_background: "path/to/image.png"
adaptive_icon_foreground: "path/to/image.png"
ios:
generate: true
image_path: "path/to/image.png"
web:
generate: true
image_path: "path/to/image.png"
background_color: "#hexcode"
theme_color: "#hexcode"
linux:
generate: true
image_path: "path/to/image.png"
windows:
generate: true
image_path: "path/to/image.png"
macos:
generate: true
image_path: "path/to/image.png"
```
What this will bring to the table?
- better organized configs
- easy to maintain
- we can also use [checked_yaml](https://pub.dev/packages/checked_yaml) to add static support
Let me know what you guys think
_Originally posted by @RatakondalaArun in https://github.com/fluttercommunity/flutter_launcher_icons/issues/363#issuecomment-1173132953_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.