-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Add sections to Flavors page about flavor-conditional asset bundling #9864
Add sections to Flavors page about flavor-conditional asset bundling #9864
Conversation
Visit the preview URL for this PR (updated for commit 4c16322): https://flutter-docs-prod--pr9864-add-flavor-specific-asset-co-ftxxhpt8.web.app |
This seems reasonable to me. I think it would be important, though, to include at least a mention of this feature at https://docs.flutter.dev/ui/assets/assets-and-images#specifying-assets . That's the place that otherwise serves to document what the syntax is for the In particular, consider the case of a user who's maintaining a project they didn't themself create from scratch, and they're trying to understand how the assets configuration works. Their starting point is "how do assets in a Flutter pubspec work", not "how do I use flavors", so they'll find that page with its "Specifying assets" section. If the pubspec file they're looking at has this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a few tiny tweaks, but this looks good, @andrewkolos! Can you also add the link in Assets & images to here? I'll go ahead an approve so you can land it when ready.
Co-authored-by: Shams Zakhour (ignore Sfshaza) <[email protected]>
Co-authored-by: Shams Zakhour (ignore Sfshaza) <[email protected]>
Co-authored-by: Shams Zakhour (ignore Sfshaza) <[email protected]>
@andrewkolos : This looks good. If you take it out of draft and update to the base branch, you can merge. |
…#10823) This is a follow-up to #9864 (comment). This adds a breadcrumb to the "Assets and images" page that mentions and links to the flavor-conditional asset bundling feature. This is meant to aid discovery of the feature for users who are new to the assets feature. I chose adding a simple bread crumb over a full explanation + example pubspec as this is a relatively niche feature, and I didn't want there to be a significant amount of text between the top-level "Specifying assets" and "Loading assets" sections, as the beginning of these sections are going to be what I feel like the vast-majority of visitors are going to be interested in. ## Presubmit checklist - [x] This PR is marked as draft with an explanation if not meant to land until a future stable release. - [x] This PR doesn’t contain automatically generated corrections (Grammarly or similar). - [x] This PR follows the [Google Developer Documentation Style Guidelines](https://developers.google.com/style) — for example, it doesn’t use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person). - [x] This PR uses [semantic line breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks) of 80 characters or fewer.
This PR introduces additional documentation for a new feature, the conditional bundling of assets based on app flavor, which will be introduced by flutter/flutter#132985.
I've decided to incorporate the documentation into the flavors page, as I believe this is where this new feature would be most relevant. I do not suspect many users would start using the flavors feature specifically for this new feature.
I've also tried to keep this documentation simple, explaining how to use the feature entirely through an example (similar to how the Adding assets and images works).
Presubmit checklist