flutter_flavor
3.1.4, released 2 years ago by an unverified publisher
Configure and define dynamic variables and UI banners for different app flavors.
What it does
Allows developers to quickly set up environment configurations (such as development, testing, and production) with custom variables and visual banners. It exposes a FlavorConfig for global variables and a FlavorBanner widget to visually indicate the current flavor on screen.
AI-written summary of version 3.1.4, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to manage different app environments like dev, test, and production
- You want to display visual flavor banners on your app UI
- You need to store and access flavor-specific variables like base URLs
Skip it when
- You require deep native-level flavor configurations in Android/iOS build systems without runtime helpers
- You are already using an alternative configuration and state setup that covers your environments
Strengths
- Provides an easy-to-use FlavorBanner widget out of the box
- Allows defining arbitrary environment variables per flavor
- Simple global configuration via FlavorConfig
Weaknesses
- Does not handle native platform-level flavor setup automatically in recent versions
- Limited to runtime configuration approach
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Initialize FlavorConfig in main and wrap your app or MaterialApp in FlavorBanner.
FlavorConfig(
name: "DEVELOP",
color: Colors.red,
location: BannerLocation.bottomStart,
variables: {
"counter": 0,
"baseUrl": "https://www.example.com",
}
);Alternatives
Packages that do the same job and could replace flutter_flavor.
- flutter_flavorizr
A utility to easily create and configure application flavors in Flutter.
86Compare - flutter_install_referrer
Detects how a Flutter app was installed on Android or iOS.
65Compare - dartdosh
Flutter build and release CLI to automate version bumping, file naming, and uploads.
65Compare - flavor_getter
Plugin to read current app flavor from native code
42Compare