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

New scheme for flutter_icons_config.yaml file #373

Open
Tracked by #379
RatakondalaArun opened this issue Jul 8, 2022 · 1 comment
Open
Tracked by #379

New scheme for flutter_icons_config.yaml file #373

RatakondalaArun opened this issue Jul 8, 2022 · 1 comment
Assignees
Milestone

Comments

@RatakondalaArun
Copy link
Collaborator

Hi @'MarkOSullivan94, @'bradintheusa

I am thinking about restructuring flutter_icons_config.yaml format

current config

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

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 to add static support

Let me know what you guys think

Originally posted by @RatakondalaArun in #363 (comment)

@RatakondalaArun RatakondalaArun self-assigned this Jul 8, 2022
@RatakondalaArun RatakondalaArun mentioned this issue Jul 23, 2022
18 tasks
@MarkOSullivan94
Copy link
Collaborator

MarkOSullivan94 commented Jul 26, 2022

I think this should arrive once support for all the other platforms has been added and then we update the major version for flutter_launcher_icons to indicate a breaking change in the config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants