What is flutter flavor?
Flavors help us to create builds for different instances of our app. For example, we can create a flavor for development, a flavor for production, and another flavor for a demo of the app. In this way, we can create different flavors, and thus have different instances of our apps before publishing them on the App Store and Google Play.
Flutter packages which help to create code structure of flutter flavor.
flutter_flavor
flavors
, as well as their names; they are dynamically defined by the developer or development team. In the configuration of a flavor you can set the name
of each flavor, as well as the color
and location
of its banner. When attribute name
is undefined or empty, the banner is hidden.You can install the package from the command line:
$ dart pub global activate very_good_cli
The package has the following executables:
$ very_good
$ very_good create app_name
Create a very good project in seconds based on the provided template. The Very Good Core template is used by default.
# Development $ flutter run --flavor development --target lib/main_development.dart # Staging $ flutter run --flavor staging --target lib/main_staging.dart # Production $ flutter run --flavor production --target lib/main_production.dart