Skip to content
pubscout

flutter_flavorizr

2.6.0, released 4 months ago by angelocassano.it

A utility to easily create and configure application flavors in Flutter.

Rock solid
$ flutter pub add flutter_flavorizr
Source repository

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.

  • mime

    Utilities to resolve MIME types from file names, magic bytes, and to parse multipart streams.

  • stream_transform

    Extension methods adding common stream transform operators

  • extension_discovery

    Convention and utilities for discovering package extensions via config.yaml files.

Works with

Packages commonly used together with flutter_flavorizr: ones it builds on, ones built on it, and its own family.