Tips And Tricks to make Flutter Development easier
Enabling AndroidX :
Instead of expecting an androidX error, you can always enable androidX right when you create the project.
flutter create --androidx app_nameSpecifying package name :
You have to change the application ID/ package name at some point in your development. So why not at the time of project creation.
flutter create --org com.bimsina awesome_appThe above code will create an app with the application ID com.bimsina.awesome_app.
Reducing App Size:
Wondering why your app is larger than usual? It’s probably because the app is running in debug mode. Well to run you application in release mode, you can always build a version of apk that will be release in the Google PlayStore.
flutter build apkBuilding AndroidApp Bundle (aab):
PlayStore recommends that you upload aab instead of apk as it helps in the reduction of download size in the user’s end.
flutter build appbundle --target-platform android-arm, android-arm64By using the target property you can specify to build only for 64 bit processors too.
Clean the project:
Facing a problem after adding various packages? The easiest solution is to clean the project and rebuild it again.
flutter cleanThis will delete your build/ directory and its created again when you rebuild the application.
Related Posts
Building Jian Yang's SeeFood app in Flutter
Building the iconic SeeFood app from Silicon Valley using Flutter and Firebase ML Kit for image recognition.
Animated Icons in Flutter
Implementing animated icons in FLutter
Changing Theme at run-time - Flutter
Dynamic theme switching implementation using BLoC pattern and shared preferences for persistent user preferences in Flutter apps.