riccardocescon / clean_chess

Lichess Client app made with Flutter
GNU General Public License v2.0
30 stars 7 forks source link

Added flags adering the ISO 3166 standard #66

Closed Steccah closed 1 year ago

Steccah commented 1 year ago

Thanks to this project for the icons

riccardocescon commented 1 year ago

@alexrintt are we going to use svgs for flag icons? Do you know other ways to acheieve this in a lighter way?

alexrintt commented 1 year ago

I saw that the folder is 2mb. image

I think the best we can do is to store just the image URLs and load through some kind of CachedNetworkImage and set the cache config to never expire, this way the user load only the flags they open.

flag package is using the same approach -> SVG assets (2mb). image


But I think the best way to display the flags is using SVG, 1. normal images aren't dpi friendly, 2. fonts aren't allowed to have multiple colors as flags do... so the only alternative is SVG.

Steccah commented 1 year ago

We could use emojis or really small jpg/png?

alexrintt commented 1 year ago

Not sure about emojis. But I think we should use SVG as you are already doing, but we should not pack it into the app built-in assets.

riccardocescon commented 1 year ago

So basically you want to download flags when needed and save them locally right?