Use Flavor detected by Flutter and not by command #247
YukiAttano
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, using a Flavor requires to pass "--flavor MY_FLAV" and "-t lib/my_flav.dart"
in package:flutter/services.dart is an environment variable called "appFlavor"
https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/services/flavor.dart
To reduce mistakes made on the command line, i would suggest to use that flavor string, parse it into the Flavor enum created by the package and throw away the multiple main_flavor.dart files.
Beta Was this translation helpful? Give feedback.
All reactions