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 guide — dart run picto:init
detects them and creates one client app per flavor in a single pass instead.
Usage#
dart run picto:init
This:
- Scans your project for declared flavors (see below for exactly how).
- Signs in and lets you pick an organization, same as
setup. -
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. -
Writes every flavor into
picto.yamlin 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#
| Platform | Where | What 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.