Closed SethuSenthil closed 6 months ago
Thank you so much for your time writing such a great issue and suggestion โค๏ธ
I really like your ideas and would appreciate any PR's. But I will definetly prioritize this, because I also think it's better to provide users a simple way to configure this IconPicker to work network-based, to cache (or not) and other great features :)
Definetly noted and will look for a solution ๐
No problem! ๐ I'm excited to work on implementing this feature and I'll be sure to open a few pull requests for it.
Based on my current understanding (though I could be mistaken), it appears that the most practical approach to loading each icon individually would be to utilize SVGs. IconData, as you may be aware, relies on code points that necessitate the use of the entire font file. However, SVGs can be loaded on demand, one by one.
Fortunately, I came across a library that seems to provide the functionality we're seeking. I haven't tested it thoroughly yet, but it appears promising. You can check it out here: https://pub.dev/packages/flutter_svg_icons
No problem! ๐ I'm excited to work on implementing this feature and I'll be sure to open a few pull requests for it.
Based on my current understanding (though I could be mistaken), it appears that the most practical approach to loading each icon individually would be to utilize SVGs. IconData, as you may be aware, relies on code points that necessitate the use of the entire font file. However, SVGs can be loaded on demand, one by one.
Fortunately, I came across a library that seems to provide the functionality we're seeking. I haven't tested it thoroughly yet, but it appears promising. You can check it out here: https://pub.dev/packages/flutter_svg_icons
Thanks for mentioning :).
Of course using SVG's remotely would be much easier. A collegue of mine also created an CachedSVGNetworkImageWidget for the best use case.
Under the hood your linked package is just relying and using SVGPicture.asset
so I would recommend directly loading svg's from backend and use them like you need :).
This package is only for quick-and-dirty usage of icons or even Generators.
Have a nice day man ๐
@SethuSenthil I resolved the app size issue by generating icons on demand. Please see latest update and let me know.
I will close this issue due to inactiveness. Please see latest version for app size & icon generation news :).
Thanks.
Issue Description: Currently, all the Icons need to be embedded with the binary, which causes the app to be larger than it needs to be. This increases the app's installation size and consumes unnecessary device storage. To improve the app's efficiency and reduce its size, it would be ideal to implement a solution that loads icons on demand through network requests and saves only the icons chosen by the user to the disk during runtime.
Issue Details:
Expected Outcome: By implementing this solution, the app's installation size will be significantly reduced as only selected icons are saved to the disk. Users will experience faster installation times and utilize less storage space on their devices. Additionally, the dynamic loading of icons on demand will improve the app's performance and enhance the overall user experience.