Ahmadre / FlutterIconPicker

An adaptive comprehensive IconPicker for Flutter
MIT License
112 stars 76 forks source link

Way to Exclude Packs #46

Closed dedvalson closed 6 months ago

dedvalson commented 2 years ago

Great Package.

I noticed that when building for web this package incresed the size of of my overall output by nearly 1 MByte. Is there an easy way (other than forking) to exclude the standard packs? I only need my own custom icons.

Thanks,

Don

Ahmadre commented 2 years ago

Great Package.

I noticed that when building for web this package incresed the size of of my overall output by nearly 1 MByte. Is there an easy way (other than forking) to exclude the standard packs? I only need my own custom icons.

Thanks,

Don

Thank you so much for your hint!

You're totally right...I will investigate how to do that. I can't promise when, but we should tackle that :3 ❤️

nicolaspernoud commented 1 year ago

It should be nice to be able to keep only normal or rounded icons at least...

Ahmadre commented 6 months ago

One little update to this @nicolaspernoud and @dedvalson

Icons are now separated (see latest changes on pub.dev).

Regards Building an App via Flutter there're 2 ways as I know to strip out unused Dart Files (Imports):

  1. https://docs.flutter.dev/perf/deferred-components (only Android + Web)
  2. Using build_runneror generate only those files which are used by the developer in their Flutter project.

I will investigate more into the second way.

nicolaspernoud commented 6 months ago

Hello, Thanks for the update. As I understand, for now, we can display only rounded icons (for example) but the normal ones won't be stripped ?

Ahmadre commented 6 months ago

Hello, Thanks for the update.

As I understand, for now, we can display only rounded icons (for example) but the normal ones won't be stripped ?

Exactly.

I'm doing some research now (when I got time) and looking for s solution for stripping out unused dart files (dart code metrics is not a solution because it's not for free and you have to pay monthly for it).

Meanwhile if someone has a solution one can always open a PR and we will maybe get sooner an update 🙂.

This topic definetly has priority.

Ahmadre commented 6 months ago

I finished it and implemented a solution @nicolaspernoud and @dedvalson 😸

See linked PR on how big/small the app size is before and after.

I will release a new version today!