fluttercommunity / font_awesome_flutter

The Font Awesome Icon pack available as Flutter Icons
Other
834 stars 236 forks source link

initial load size #196

Closed gururaja-kambala closed 2 years ago

gururaja-kambala commented 2 years ago

I am trying to use font awesome in flutter web

after adding font_awesome_flutter: ^9.2.0 in pubspec.yml

If I check Network tab in chrome dev tool, i could see below 3 files getting loaded. One of them is 8 MB, is it mandatory dependency for font awesome? can we reduce files size if we need only selected icons?

image

full url for this 8mb file is https://fonts.gstatic.com/s/notocoloremojicompat/v38/TUZgzxRkpOVJnwykwd_mLYH3Fv9u9SaFlBEYPRbQ.woff2

gururaja-kambala commented 2 years ago

flutter is downloading this file, only if I run package by "flutter run"

If I build package using "flutter build web" and then deploy package in web server it works great.

michaelspiss commented 2 years ago

Hi, I'm not sure why flutter does this, but we neither have a dependency on nor an import of any google emojis. You may want to ask the flutter dev team why this happens, but I guess it's for development compatability reasons. However, I don't see the problem as long as it's not in the release build.