We are planning to move our codebase to flutter, but we have some specific requirements and trying to validate them before moving all our codebase to flutter.
I've looked at the below examples :
https://cogitas.net/creating-flavors-of-a-flutter-app/
https://medium.com/@salvatoregiordanoo/flavoring-flutter-392aaa875f36
But both of them were about creating multiple build configurations, but they don't mention about creating multiple targets.
So my question is , is it possible to create multiple targets and multiple schemes at the same time with flutter ? If its possible , how can we do that?
You can see our current applications scheme and target configurations in below screenshot:
Thanks
Use debug mode during development, when you want to use hot reload. Use profile mode when you want to analyze performance. Use release mode when you are ready to release your app.
aab . By default, the app bundle contains your Dart code and the Flutter runtime compiled for armeabi-v7a (ARM 32-bit), arm64-v8a (ARM 64-bit), and x86-64 (x86 64-bit).
There are 3 different build modes in flutter: Debug : This is the most common mode we always test the apps. If you are using Android Studio you can find its button on the top panel (a green play button). Release : This mode is for deploying the app on market places.
To display information that you would like to be visible in release mode ('production code') of your flutter app, simply use print() method. For info you want to hide in console log use debugPrint() .
I have a Youtube tutorial series on how to do this exactly. Following that, you will be able to separate environments in dart as well as native side and you will be able to use all the features available with Android flavors and iOS schemas and build-configurations. In the tutorial I have shown how to use two different firebase configurations for dev and production version in both iOS and Android. If you have any questions, you can comment
You can use build variants:
A flavour or a build variant can be multiple things, it can be used to target different device architectures or different backends. Android presents a separate distinction to both, so you can target different Android API versions and well as different backend support, for iOS I’m not quite certain, but it also does support these in some fashion.
and for doing this you need to modify the main.dart to support variants, here is the full article how this will work on different environments.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With