Skip to content

Missing section in docs Conditionally bundling assets based on flavor #11816

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

Closed
1 task
ken-onymos opened this issue Mar 13, 2025 · 5 comments · Fixed by #11833 or #11860
Closed
1 task

Missing section in docs Conditionally bundling assets based on flavor #11816

ken-onymos opened this issue Mar 13, 2025 · 5 comments · Fixed by #11833 or #11860
Assignees
Labels
dev.flavors Relates to flavor configuration for deployment from.page-issue Reported in a reader-filed concern

Comments

@ken-onymos
Copy link

Page URL

https://docs.flutter.dev/deployment/flavors#conditionally-bundling-assets-based-on-flavor

Page source

https://github.com/flutter/website/blob/main/src/content/deployment/flavors.md

Describe the problem

The page at https://docs.flutter.dev/deployment/flavors used to have information about conditionally bundling assets based on flavor, but that information was recently removed via 1c2d97c.

Was the deletion of information intentional? Is the conditional-bundling functionality still supported by the Flutter SDK; if not, what is the alternative functionality to use?

Expected fix

The deleted section on conditionally bundling assets based on flavor should be restored, because that information cannot be found anywhere else on the website.

Additional context

Previous version of the page: https://web.archive.org/web/20250226113505/https://docs.flutter.dev/deployment/flavors#conditionally-bundling-assets-based-on-flavor

Current version of the page: https://web.archive.org/web/20250313191131/https://docs.flutter.dev/deployment/flavors

I would like to fix this problem.

  • I will try and fix this problem on docs.flutter.dev.
@ken-onymos ken-onymos added the from.page-issue Reported in a reader-filed concern label Mar 13, 2025
@antfitch
Copy link
Contributor

antfitch commented Mar 17, 2025

Hi, this deletion was intentional, but I see your point. I have an idea, but I need to get some information first.

@reidbaker or @andrewkolos...

  • I see that we have the pubspec file documented here: https://dart.dev/tools/pub/pubspec, but it's missing the Flutter supported fields.
  • The pubspec documentation mentions that pubspec for Flutter apps can have additional fields, but these fields aren't listed anywhere in the documentation that is specifically for those fields. https://docs.flutter.dev/development/tools/pubspec. Is there a file that I can look at that has all of these fields?

@antfitch antfitch added the dev.flavors Relates to flavor configuration for deployment label Mar 17, 2025
@andrewkolos
Copy link
Contributor

I don't believe the flavor-conditional asset bundling feature was ever removed from the SDK.

The pubspec documentation mentions that pubspec for Flutter apps can have additional fields, but these fields aren't listed anywhere in the documentation that is specifically for those fields. https://docs.flutter.dev/development/tools/pubspec. Is there a file that I can look at that has all of these fields?

I am not aware of any single piece of documentation that lists all available fields1. The original doc pages about flavor-conditional asset bundling was effectively the documentation for the pubspec grammar for using that feature.

Footnotes

  1. The next best thing is the Dart code for parsing the pubspec itself.

@antfitch
Copy link
Contributor

antfitch commented Mar 18, 2025

Okay great. Everyone, I'm going to work on this today. My initial plan is to see if I can address the supported fields that aren't documented in https://docs.flutter.dev/development/tools/pubspec and then link to them from the Flavors guide.

@antfitch
Copy link
Contributor

Keep an eye on this PR: https://github.com/flutter/website/pull/11833

The first part of the fix I want to implement is to update our pubspec guide to include the flavor fields. If @sfshaza2 is okay with this update, the second part of the fix is updating the flavors docs, likely with a link to the updated pubspec guide.

@antfitch
Copy link
Contributor

antfitch commented Apr 2, 2025

Just finished https://github.com/flutter/website/pull/11833. We now have an updated pubspec reference with a full list of Flutter-specific fields, including ones for Flavors.

Next step is to link our Flavors guides to the pubspec here: https://docs.flutter.dev/tools/pubspec

@antfitch antfitch linked a pull request Apr 2, 2025 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev.flavors Relates to flavor configuration for deployment from.page-issue Reported in a reader-filed concern
Projects
None yet
3 participants