Skip to content

Latest commit

 

History

History
32 lines (18 loc) · 1000 Bytes

File metadata and controls

32 lines (18 loc) · 1000 Bytes

Launching your Flutter app with flavors

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
⚠️ debugPrint prints in release mode ⚠️ We need to talk about FlutterFlow!