Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support exclusion of flavors when conditonally defining assets #148584

Open
lucas-goldner opened this issue May 17, 2024 · 0 comments
Open

Support exclusion of flavors when conditonally defining assets #148584

lucas-goldner opened this issue May 17, 2024 · 0 comments
Labels
c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter team-tool Owned by Flutter Tool team tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@lucas-goldner
Copy link

Use case

Imagine I have an app with 20 flavors. I want that one file to be included in 19 flavors but not one specific one.
I would need to add all 19, except for 1 in that big list.

# pubspec.yaml
flutter:
  assets:
    - assets/normal-asset.png
    - path: assets/good-tasting.png
      flavors: 
        - vanilla
        - strawberry
        - chocolate
        - lemon
        - smurf
        - orange
        - ...more

Proposal

How about handling it like in a .gitignore with "!" so it will be included in all other flavors, excluding the ones marked with "!"

# pubspec.yaml
flutter:
  assets:
    - assets/normal-asset.png
    - path: assets/good-tasting.png
      flavors: 
        - !strawberry
@danagbemava-nc danagbemava-nc added in triage Presently being triaged by the triage team c: new feature Nothing broken; request for a new capability tool Affects the "flutter" command-line tool. See also t: labels. c: proposal A detailed proposal for a change to Flutter team-tool Owned by Flutter Tool team and removed in triage Presently being triaged by the triage team labels May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter team-tool Owned by Flutter Tool team tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

No branches or pull requests

2 participants