Open Xazin opened 1 year ago
Addding --obfuscate --split-debug-info=build-info/
reduces by about 2MB
Any reason why we are not tree shaking icons
static IconData fromString(String iconName) {
return ioniconsMapping[iconName] != null
? int.tryParse(ioniconsMapping[iconName]!) != null
? IoniconsData(int.tryParse(ioniconsMapping[iconName]!)!)
: CollactionIcons.collaction
: CollactionIcons.collaction;
}
We can actually extract only the icons we need from both.
Any reason why we are not tree shaking icons
static IconData fromString(String iconName) { return ioniconsMapping[iconName] != null ? int.tryParse(ioniconsMapping[iconName]!) != null ? IoniconsData(int.tryParse(ioniconsMapping[iconName]!)!) : CollactionIcons.collaction : CollactionIcons.collaction; }
We can actually extract only the icons we need from both.
You can play around with it, but the reason is quite simple.
How will you know which icons the backend will want to display on a Commitment? You can't, therefore them all.
Some comments here that I noticed:
Also noticed mocktail
should be moved to dev_dependencies
, not sure why it's not there already.
We might also be able to take out rxdart
, our usage is quite limited, and we could definitely do without it.
I guess, all of this along with at least --obfuscate
should be enough.
Description: We should make an effort to optimize our application size.
To complete this task please do the following:
Note: We currently build with
--no-tree-shake-icons
for both iOS and Android!These are the commands used in CICD:
References: https://docs.flutter.dev/perf/app-size https://medium.com/gytworkz/how-to-decrease-app-size-in-flutter-10461f91f168
https://itnext.io/flutter-minimizing-tips-42113f02b678 (Some tips)