Open triallax opened 3 years ago
I've already opened two PRs to remove the font_awesome_flutter
and package_info
packages. Other packages that will be removed before v2.0 comes out are: flutter_spinkit
(since we're going to remove the loading screen), device_preview
(the beast of them all), and possibly implement material_floating_search_bar
locally in the project.
Currently, the app stands at roughly 7 MB, but with all the packages we are going to remove and all the refactoring we are going to make, I guess the app size would go below 5 MB.
Some other dependencies we can remove:
flutter_hooks
and hooks_riverpod
: Riverpod 1.0.0 is going to make flutter_riverpod
more convenient and powerful. We use hooks independently of Riverpod in a few places, but those usages can be refactored out easily.dartz
: I'm not sure, but maybe if we implement Either
locally in clima_core
it would be smaller.Klingt Gut!
So I investigated and tried out some things; here are my results:
device_preview
and Flutter itself, flutter_svg
and its dependencies contribute relatively heavily to the overall size of the APK. It may be possible to remove the dependency if https://github.com/flutter/flutter/issues/1831 is resolved. Another possibility is somehow compiling the SVG down to Dart code. Of course, the difference might be negligible, as Flutter itself is the cause for most of the APK's fat.Note that I did these tests on #220.
Right now, Clima is a little too big for what it does. We need to take steps to reduce its size.
F-Droid-specific:
General:
Any suggestions welcome.