flutter_flavorizr
2.6.0, released 4 months ago by angelocassano.it
A utility to easily create and configure application flavors in Flutter.
What it does
It automates the creation and setup of application flavors for Android, iOS, Windows, macOS, and Linux by modifying project configuration files, adding build targets, and generating entry points and assets based on a YAML configuration file.
AI-written summary of version 2.6.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are starting a new Flutter project and need multiple environments like development, staging, and production.
- You want to automate the complex and error-prone setup of native build configurations for flavors across multiple platforms.
Skip it when
- Working on an existing complex project where automated processors might conflict with custom native configurations.
- You prefer to manually configure native Gradle, Xcode, and CMake settings for each environment.
Strengths
- Supports multiple platforms including Android, iOS, macOS, Linux, and Windows.
- Eliminates the need for external tools like Ruby/gem on macOS/iOS by using dart_xcodeproj.
- Automates icon generation, Firebase setup, and IDE run configurations.
Weaknesses
- Can throw errors when run over an existing project with a custom base structure.
- Requires careful adherence to a specific YAML configuration format.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- Yes (build_runner)
- Direct dependencies
- 13
Add flutter_flavorizr to dev_dependencies, create a flavorizr.yaml configuration file, and run the tool from the command line.
flavors:
apple:
app:
name: "Apple App"
android:
applicationId: "com.example.apple"
ios:
bundleId: "com.example.apple"Alternatives
Packages that do the same job and could replace flutter_flavorizr.
- gtk
GTK utilities for Flutter Linux applications, providing settings and application lifecycle helpers.
76Compare - mime
Utilities to resolve MIME types from file names, magic bytes, and to parse multipart streams.
92Compare - stream_transform
Extension methods adding common stream transform operators
91Compare - extension_discovery
Convention and utilities for discovering package extensions via config.yaml files.
86Compare
Works with
Packages commonly used together with flutter_flavorizr: ones it builds on, ones built on it, and its own family.
- archiveflutter_flavorizr depends on itEncodes and decodes archive and compression formats such as zip, tar, gzip, and zlib.
- yamlflutter_flavorizr depends on itA Dart library for parsing YAML documents into Dart data structures.
- xmlflutter_flavorizr depends on itFull-featured XML and XPath library for DOM parsing, SAX streaming, and fluent building.
- ioflutter_flavorizr depends on itUtilities for the Dart VM Runtime including ANSI colors, file copying, and exit code values.
- json_annotationflutter_flavorizr depends on itProvides annotations for json_serializable to generate JSON (de)serialization code.
- argsflutter_flavorizr depends on itLibrary for parsing raw command-line arguments into options and values using GNU and POSIX styles.
- checked_yamlflutter_flavorizr depends on itProvides checkedYamlDecode to give detailed errors when decoding YAML with json_serializable.
- imageflutter_flavorizr depends on itPure Dart library to load, manipulate, encode, and decode various image formats.