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

Enhance pubspec guide #11833

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

antfitch
Copy link
Contributor

@antfitch antfitch commented Mar 19, 2025

Description of what this PR is changing or adding, and why:

The existing guide was missing some supported fields and listing some packages as fields. The guide has a very nice robust example, but no robust documentation about the fields and packages in the example. To address this, I added a section called Fields and a section called Packages that goes over the Flutter-specific field and packages, and more specifically, the various data structures that can exist for each field.

@Sfshaza if you think this idea works and you like the general design, @andrewkolos, @vashworth, and @reidbaker can you look closely over the technical details? Am I missing any fields or packages? I have no idea how large the package list is and wasn't sure if we should document this here.

Notes:

  • Values that are directories seem to be treated differently in some fields. In some fields, a directory can end with /, and in some fields the / will produce an error.
  • Shams, if you like this change, I'll create an issue to link to this PR.

Preview:

Issues fixed by this PR (if any):

PRs or commits this PR depends on (if any):

Presubmit checklist

  • This PR is marked as draft with an explanation if not meant to land until a future stable release.
  • This PR doesn’t contain automatically generated corrections (Grammarly or similar).
  • This PR follows the Google Developer Documentation Style Guidelines — for example, it doesn’t use i.e. or e.g., and it avoids I and we (first person).
  • This PR uses semantic line breaks of 80 characters or fewer.

@antfitch antfitch requested review from sfshaza2, parlough and a team as code owners March 19, 2025 18:03
@flutter-website-bot
Copy link
Collaborator

flutter-website-bot commented Mar 19, 2025

Visit the preview URL for this PR (updated for commit 574a86b):

https://flutter-docs-prod--pr11833-conditionally-build-assets-4acsj9hk.web.app

@antfitch antfitch changed the title Enhance pubspec guide [Experimental] Enhance pubspec guide Mar 19, 2025
@antfitch antfitch marked this pull request as draft March 19, 2025 18:11
@antfitch antfitch self-assigned this Mar 19, 2025
Copy link
Contributor

@sfshaza2 sfshaza2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@antfitch, this is a huge improvement! lgtm

@antfitch antfitch requested a review from vashworth March 19, 2025 21:43
@antfitch antfitch changed the title [Experimental] Enhance pubspec guide Enhance pubspec guide Mar 20, 2025
Copy link
Contributor

@vashworth vashworth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@antfitch
Copy link
Contributor Author

antfitch commented Mar 24, 2025

I don't know how thorough you want this to be, but I found some other obscure settings:

I believe these have both been turned down. I will double check...

  • It looks like default-flavor is available, but only for Android. I'll add this here with a note that this is only for Android.
  • I thought I saw somewhere that deferred-components shouldn't be used last week, but I can't find that thread today. I'll add this.

And I've added new sections for both of these. ^_^

@vashworth
Copy link
Contributor

vashworth commented Mar 24, 2025

  • It looks like default-flavor is available, but only for Android

Why do you think it's only for Android? Seems like at least iOS can use it too

@antfitch
Copy link
Contributor Author

antfitch commented Mar 24, 2025

  • It looks like default-flavor is available, but only for Android

Why do you think it's only for Android? Seems like at least iOS can use it too

I see references to it not working in flutter/flutter#147968, but @andrewkolos mentioned that it should work. I will go with the team's impression that it does work.

@antfitch
Copy link
Contributor Author

antfitch commented Mar 24, 2025

@reidbaker can you take another look at the deferred-components field?

@antfitch antfitch changed the title Enhance pubspec guide [WIP] Enhance pubspec guide Mar 25, 2025
@antfitch antfitch marked this pull request as ready for review March 25, 2025 16:02
@antfitch antfitch marked this pull request as draft March 25, 2025 16:02
@antfitch antfitch changed the title [WIP] Enhance pubspec guide Enhance pubspec guide Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants