Did you know?
When you run your Flutter app, you can add a --flavor
argument.
To get the flavor at runtime, import services.dart
and read the appFlavor
global variable.
This will return a string that you can map to a type-safe enum.
Note that some platform-specific configuration is needed:
- on iOS and macOS, you need to set up some custom schemes and bundle IDs
- on Android, you need to add some
productFlavors
to the build.gradle file
Check this guide for all the details:
Found this useful? Show some love and share the original tweet 🙏
Previous | Next |
---|---|
We need to talk about FlutterFlow! |