refactor(deps): remove unnecessary Iconsax and http, use Material Ico…#239
Conversation
…ns for built-in types
|
I think a better approach would be to keep the app’s visual appearance unchanged while removing the dependency on the Iconsax package. To do that, I gathered only the icons we actually use and added them as a .ttf file directly in the assets. This way, we maintain the same design while reducing the overall package size. I updated this PR so you can review it and let me know what do you think? |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #239 +/- ##
==========================================
- Coverage 74.51% 74.43% -0.09%
==========================================
Files 31 32 +1
Lines 926 927 +1
==========================================
Hits 690 690
- Misses 236 237 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@payam-zahedi Even in most cases, i think developers tend to use different icon packs or replace the default icons anyway, so this approach won’t negatively impact them. On the contrary, it’s a great optimization and won’t noticeably increase the app size. Embedding only the required icons as a I’ve reviewed the updated PR, and the direction looks solid to me 👍 |
|
@payam-zahedi Do we know if the Iconsax license explicitly allows this kind of usage (modification and redistribution)? Just want to make sure we're on the safe side, especially if this package is intended to be public. If the licensing terms are unclear, it might be safer to consider an open-source icon set instead. Overall, great approach just worth double-checking the legal side before merging ... I double-checked the licensing, and since Iconsax is released under the BSD 3-Clause License, this approach is actually valid. Bundling required icons as a |
|
That actually is a really valid point. Thanks for checking the license. I'll double-check it as well and come back to you. |
|
Thanks again, @MostafaSensei106 for your contribution. I added a section in the README.md file for iconsax icons |
refactor(deps): remove unused Iconsax and http, use Material Icons
This PR removes unnecessary dependencies and improves the overall efficiency and maintainability of the package by relying on Flutter's built-in resources.
Closes #229
Changes
IconsaxdependencyhttpdependencyIconsaxicons with FlutterMaterial Iconsfor built-in toast typesinfosuccesswarningerrorUpdated tests to reflect the new icon set
Reduce application bundle size (APK/AAB)
Eliminate unnecessary dependencies
Improve build performance and dependency management
Ensure consistency by using Flutter's built-in
Material IconsSimplify long-term maintenance
Breaking Changes
No breaking changes intended.
The update only affects default icons (UI detail) and does not modify the public API.
Testing
Impact
Notes
Using built-in
Material Iconsavoids adding external packages for minimal usage, making the library lighter and more efficient for consumers.