Skip to content

Support platform specific default-flavor #176820

@prateekmedia

Description

@prateekmedia

Use case

Currently the pubspec.yaml's default-flavor assumes that the flavor name exists in all platforms that support flavor, which might be a wrong assumption.

For example in the app I am working on, it only has flavors for android and not for iOS, which works for us. But we also want default-flavor, but we can't have it since it assume that flavor exists on iOS and flutter run fails.

Also in iOS we have schemes and not flavors. Schemes are generally in PascalCase and not in snake_case or camelCase. So someone might want a pascal case scheme name for iOS and camelCase for android.

Proposal

Allow default-flavor-$platformName as a parameter if it is present else use default-flavor, this way if someone only has flavor's on android, they can just do:
default-flavor-android: $flavorName

Or do:
default-flavor-android: $flavorName1
default-flavor-iOS: $flavorName2

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions