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

[Feature Request] Split the lib into many subpackages by family. #29

Closed
henry2man opened this issue May 6, 2020 · 3 comments
Closed

Comments

@henry2man
Copy link

Hi folks.

First of all I want to thanks you. I'm currently using this package and it's great! :)

I was wondering if it makes sense split this package into several subpackages in order to optimize application size. In my case I'm just using MaterialCommunityIcons. AFAIK I have to import the whole package, including the other .ttfs & resources, increasing the total size.

Is this possible? Do I am wrong assuming that all resources are bundled into the release builds?

Regards.

@henry2man
Copy link
Author

henry2man commented May 6, 2020

UPDATE: I've migrated my app to this package https://pub.dev/packages/material_design_icons_flutter (it's a little bit outdated but it contained 90% of my app icons).

Building my app with flutter_icons 1.1.0:

$> flutter flutter build apk --split-per-abi

Gave me these results:

-rw-rw-r-- 1 enrique enrique 12326K may  6 18:53 app-arm64-v8a-release.apk
-rw-rw-r-- 1 enrique enrique 12074K may  6 18:53 app-armeabi-v7a-release.apk
-rw-rw-r-- 1 enrique enrique 12470K may  6 18:53 app-x86_64-release.apk

And then, the same project with material_design_icons_flutter 4.0.5145 gave me these results:

-rw-rw-r-- 1 enrique enrique 11405K may  6 19:16 app-arm64-v8a-release.apk
-rw-rw-r-- 1 enrique enrique 11153K may  6 19:16 app-armeabi-v7a-release.apk
-rw-rw-r-- 1 enrique enrique 11595K may  6 19:16 app-x86_64-release.apk

You'll notice the ~1Mb size reduction... using the same icons.

I don't know if the latter package is optimized or not compared to flutter_icons but, in my case, the migration worths.

Thanks

@2534290808
Copy link
Contributor

Now you can just keep the font you used. See how to use

@henry2man
Copy link
Author

Oh thanks! I didn't notice the new possibilities. My mistake!

In this case I think my issue doesn't make sense.

Thank you for your support.

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