Logopicto

Auto-Detecting Flavors

Already have Android productFlavors or iOS build configurations set up? Create every flavor's client app in one pass.

dart run picto:setup walks you through one flavor at a time — sign in, pick an organization and client app, name the flavor, repeat for the next one. That's the right tool for a project with no flavors yet, or for adding a single new one.

If your project already declares real build flavors — Android productFlavors in android/app/build.gradle/build.gradle.kts, or iOS build configurations set up per Flutter's own flavors guidedart run picto:init detects them and creates one client app per flavor in a single pass instead.

Usage#

dart run picto:init

This:

  1. Scans your project for declared flavors (see below for exactly how).
  2. Signs in and lets you pick an organization, same as setup.
  3. Creates one client app per detected flavor, named <your-package-name>-<flavor> (e.g. myapp-dev, myapp-staging, myapp-prod) — re-running it against the same project reuses those same client apps instead of creating duplicates.
  4. Writes every flavor into picto.yaml in one pass, prompting once for which should be the default if more than one was just added.

Existing flavors already in picto.yaml from an earlier setup/init run aren't touched unless you confirm overwriting them.

How flavors are detected#

PlatformWhereWhat counts as a flavor
Android android/app/build.gradle or build.gradle.kts Each entry inside a productFlavors { ... } block — both the Groovy ( dev { ... } ) and Kotlin DSL ( create("dev") { ... } ) styles.
iOS ios/Runner.xcodeproj/project.pbxproj The suffix after the dash in a Debug-<flavor> / Release-<flavor> / Profile-<flavor> build configuration name. A flavor-less project's plain Debug / Release / Profile configurations don't count.

Every flavor found on either platform gets its own client app — if Android and iOS disagree (a flavor added to one but not wired up on the other yet), init warns about the mismatch but still creates a client app for every name it found, so nothing is silently skipped.

If neither platform has any flavors declared, init fails fast with a message pointing at Flutter's flavors guide instead of prompting for credentials for a run that couldn't do anything anyway. Use setup in that case — it doesn't need any flavors to already exist.