Skip to content

Support different set of assets depending on --flavor xxx #21682

@zoechi

Description

@zoechi

Edit by @christopherfujino

A design doc for this proposal is at https://flutter.dev/go/flavor-specific-assets


I want to create different flavors of the app and they differ (among other things) on the used assets (icons, backgrounds, fonts, logos, ...)

Currently this seems to require to modify pubspec.yaml before running flutter build
but that is cumbersome.

I'd prefer something like

flutter_assets.yaml # shared assets
flutter_assets_chocolate.yaml # additional assets for chocolate flavor
flutter_assets_strawberry.yaml # additional assets for strawberry flavor

where the shared assets and the assets where the file suffix matches the --flavor xxx value are merged and the result used for flutter build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: assetsPackaging, accessing, or using assetsa: sizeReducing IPA/APK/JS sizesc: new featureNothing broken; request for a new capabilityc: performanceRelates to speed or footprint issues (see "perf:" labels)customer: crowdAffects or could affect many people, though not necessarily a specific customer.design docTracks a design discussion documentperf: app sizePerformance issues related to app size (binary/code size) or disk spacer: fixedIssue is closed as already fixed in a newer versionteam-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