Decoupling recopy#11888
Conversation
Feat: Add a11y for loading indicators fixes: #161631 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
Original PR/Discussion: flutter/flutter#172915 # Framework: * `EditableText`/`SelectableText`, applies `lineHeightScaleFactorOverride`, `wordSpacingOverride`, and `letterSpacingOverride` to it's `TextStyle` similarly to how we already do for bold platform overrides. Note `SelectableText` is built on `EditableText` so it also applies these overrides. * `Text`, applies `lineHeightScaleFactorOverride`, `wordSpacingOverride`, and `letterSpacingOverride` to it's `TextStyle` similarly to how we already do for bold platform overrides. * Exposes line height override through `MediaQueryData.lineHeightScaleFactorOverride` and `maybeLineHeightScaleFactorOverrideOf(context)`. * Exposes letter spacing override through `MediaQueryData.letterSpacingOverride` and `maybeLetterSpacingOverrideOf(context)`. * Exposes word spacing override through `MediaQueryData.wordSpacingOverride` and `maybeWordSpacingOverrideOf(context)`. * Exposes paragraph spacing override through `MediaQueryData.paragraphSpacingOverride` and `maybeParagraphSpacingOverrideOf(context)`. * `MediaQuery.applyTextStyleOverrides()` \ `MediaQueryData.applyTextStyleOverrides()` to be able to reset/override the text spacing settings on `MediaQueryData`. # Engine: * Introduces new members on `PlatformDispatcher` API that hold the text spacing properties that are overridden on the web. * We provide the `lineHeightScaleFactorOverride`, `letterSpacingOverride`, `wordSpacingOverride`, and `paragraphSpacingOverride` on the web by attaching a `ResizeObserver` to an off-screen hidden element, when its size changes we capture its text spacing CSS properties, and notify the framework through `onMetricsChanged`. Fixes #142712 https://github.com/user-attachments/assets/aaaa3e74-c232-4956-acd2-ae1a4487e415 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Renzo Olivares <roliv@google.com>
<!-- start_original_pr_link --> Reverts: flutter/flutter#165173 <!-- end_original_pr_link --> <!-- start_initiating_author --> Initiated by: chingjun <!-- end_initiating_author --> <!-- start_revert_reason --> Reason for reverting: The PR did not finish "Google Testing", and actually caused several failures in Google <!-- end_revert_reason --> <!-- start_original_pr_author --> Original PR Author: rkishan516 <!-- end_original_pr_author --> <!-- start_reviewers --> Reviewed By: {chunhtai, flutter-zl} <!-- end_reviewers --> <!-- start_revert_body --> This change reverts the following previous change: Feat: Add a11y for loading indicators fixes: #161631 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. <!-- end_revert_body --> Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
…t (#178117) This is my attempt to handle flutter/flutter#6537 for the DefaultTabController widget.
…e_list_view_builder.0.dart` example (#178214) <img width="859" height="148" alt="Screenshot 2025-10-27 at 20 09 35" src="https://github.com/user-attachments/assets/daf13a7b-a157-410a-9feb-dc466128c5a1" /> Similar PRs: - #177374 - #177490 - #177540 - #177541 - #177542 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] All existing and new tests are passing. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [ ] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
<!-- Thanks for filing a pull request! Reviewers are typically assigned within a week of filing a request. To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md --> ### This PR fixes #166398 - Adds focus support for `CupertinoActionSheetAction`. This makes it work with keyboard shortcuts - Creates new widget, `CupertinoTraversalGroup` that applies a Cupertino style focus border around its child when any of its descendant has focus - Employs `CupertinoTraversalGroup` in `CupertinoActionSheet` How the new implementation looks and behaves: https://github.com/user-attachments/assets/ea6789f1-921d-4598-bcca-489dc063ff73 How the native counterpart looks and behaves: https://github.com/user-attachments/assets/4c6ae2a0-7205-4de2-b981-ec7f4839da6e ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md --------- Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
This is my attempt to handle flutter/flutter#6537 for the TabBarView widget.
## Description This PR adds `DropdownMenuFormField.decorationBuilder` and passes it to the underlying `DropdownMenu`. ## Related Issue Follow-up to flutter/flutter#176264 which added `DropdownMenu.decorationBuilder`. ## Tests - Adds 1 test.
## Description This PR fixes `DropdownMenu` preferred width calculation to include the label provided by `DropdownMenu.decorationBuilder`. ## Before <img width="225" height="63" alt="Image" src="https://github.com/user-attachments/assets/47dbec7d-c59c-4379-8f22-792c844f6ac4" /> ## After <img width="225" height="63" alt="Image" src="https://github.com/user-attachments/assets/d4223e56-2b3f-4e12-893a-284ceb3b8ea4" /> ## Related Issue Fixes [DropdownMenu wrong width when decorationBuilder provides label ](flutter/flutter#178459) ## Tests - Adds 2 tests.
…8635) - Fix flutter/flutter#178633 - This PR is to clean API examples, improve user experience when accessing API page ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md Signed-off-by: huycozy <huy@nevercode.io>
…pply to ModalRoute (#177570) Fix premature dialog dismissal on Flutter Web when semantics are enabled by correctly propagating hitTestBehavior through the semantics pipeline and declaring modal routes as opaque to pointer events. Before change https://dialog-dismiss-before.web.app/ Click on the "Show Dialog" button. Click anywhere inside the dialog that is not a form field. Observe the dialog being dismissed. After change https://dialog-dimiss-after.web.app/ Click on the "Show Dialog" button. Click anywhere inside the dialog that is not a form field. Observe the dialog not dismissed. Fixes: #149001 Engine work: #176974
…8618) <img width="951" height="141" alt="Screenshot 2025-11-16 at 22 02 12" src="https://github.com/user-attachments/assets/3aae6cfe-b5f4-41d9-a1f5-4a658894a007" /> ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [ ] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
…get and apply to ModalRoute (#177570)" (#178744) <!-- start_original_pr_link --> Reverts: flutter/flutter#177570 <!-- end_original_pr_link --> <!-- start_initiating_author --> Initiated by: chingjun <!-- end_initiating_author --> <!-- start_revert_reason --> Reason for reverting: Broke internal tests. <!-- end_revert_reason --> <!-- start_original_pr_author --> Original PR Author: flutter-zl <!-- end_original_pr_author --> <!-- start_reviewers --> Reviewed By: {chunhtai} <!-- end_reviewers --> <!-- start_revert_body --> This change reverts the following previous change: Fix premature dialog dismissal on Flutter Web when semantics are enabled by correctly propagating hitTestBehavior through the semantics pipeline and declaring modal routes as opaque to pointer events. Before change https://dialog-dismiss-before.web.app/ Click on the "Show Dialog" button. Click anywhere inside the dialog that is not a form field. Observe the dialog being dismissed. After change https://dialog-dimiss-after.web.app/ Click on the "Show Dialog" button. Click anywhere inside the dialog that is not a form field. Observe the dialog not dismissed. Fixes: #149001 Engine work: #176974 <!-- end_revert_body --> Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
…78156) This is my attempt to handle flutter/flutter#6537 for the TabPageSelector widget.
… (#177646) This is my attempt to handle flutter/flutter#6537 for the ReorderableListView widget. Co-authored-by: Victor Sanni <victorsanniay@gmail.com>
…(#178569) `evaluate` use transform under the hood : ``` dart T evaluate(Animation<double> animation) => transform(animation.value); ``` in that case , it is possible to use `transform` direclty: ```dart transform(animation.value); ``` ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [ ] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
…454) This is my attempt to handle flutter/flutter#6537 for the ToggleButtons widget. Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com> Co-authored-by: Victor Sanni <victorsanniay@gmail.com>
This is my attempt to handle flutter/flutter#6537 for the TabBar widget. --------- Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com> Co-authored-by: Victor Sanni <victorsanniay@gmail.com>
…… (#177978) This is my attempt to handle flutter/flutter#6537 for the CupertinoSpellCheckSuggestionsToolbar widget. Co-authored-by: Victor Sanni <victorsanniay@gmail.com> Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
…… (#178374) This is my attempt to handle flutter/flutter#6537 for the TextSelectionToolbarTextButton widget. Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com> Co-authored-by: Victor Sanni <victorsanniay@gmail.com>
This updates Flutter to the latest release, which includes a bunch of code cleanup that should improve compiled code size and (hopefully) runtime performance. The changes in flutter/flutter#153385 (discussed in https://docs.flutter.dev/release/breaking-changes/material-design-3-token-update) seem to have been incomplete. This PR effectively catches up with these changes by updating the "math" behind primary, secondary, tertiary, error colors. There is a pending PR on the site to update the corresponding docs: flutter/website#12125 Fixes flutter/flutter#177285
…t (#178722) This is my attempt to handle flutter/flutter#6537 for the CupertinoContextMenu widget.
…78613) This is my attempt to handle flutter/flutter#6537 for the CupertinoTabBar widget. Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com> Co-authored-by: Victor Sanni <victorsanniay@gmail.com>
…… (#178566) This is my attempt to handle flutter/flutter#6537 for the CupertinoLinearActivityIndicator widget. Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com> Co-authored-by: Victor Sanni <victorsanniay@gmail.com>
…178451) This is my attempt to handle flutter/flutter#6537 for the TimePickerDialog widget. Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com> Co-authored-by: Victor Sanni <victorsanniay@gmail.com>
…… (#178516) This is my attempt to handle flutter/flutter#6537 for the UserAccountsDrawerHeader widget. Co-authored-by: Victor Sanni <victorsanniay@gmail.com> Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [ ] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
This is my attempt to handle flutter/flutter#6537 for the Stepper widget. --------- Co-authored-by: Victor Sanni <victorsanniay@gmail.com> Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
This is my attempt to handle flutter/flutter#6537 for the SearchAnchor widget. --------- Co-authored-by: Victor Sanni <victorsanniay@gmail.com> Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
…readablity (#178909) ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [ ] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
Piinks
left a comment
There was a problem hiding this comment.
Ah this is so very close! Exciting! 🎊
|
|
||
| For example (no pun intended!), to run the first example from the | ||
| `CupertinoActivityIndicator` class in Chrome, you would run it like so from the | ||
| [api](.) |
There was a problem hiding this comment.
This is where I got it from: https://github.com/flutter/flutter/blob/master/examples/api/README.md
Looks like it indeed links to the api directory, but in our case it should say "example" instead!
| wanted to add a new example to the `CupertinoActivityIndicator` class: | ||
|
|
||
| ```dart | ||
| /// {@tool dartpad} |
There was a problem hiding this comment.
Nit: dartpad here could be (temporarily) misleading
There was a problem hiding this comment.
This is not the ultimate format based on the new @example dartdoc feature correct?
There was a problem hiding this comment.
Correct, I haven't changed any of the @tool dartpad directives yet. @dkwingsmt can you advise on what those should look like now?
I'll go ahead and change this one to @example for now and plan to migrate everything else after this PR lands.
| hasn't been used in an example before, you may have to add it to the | ||
| [pubspec.yaml](pubspec.yaml) in the [cupertino_ui_examples](./) directory. | ||
|
|
||
| ## Snippets |
There was a problem hiding this comment.
I don't think snippet or sample will be supported in these packages, we have to migrate them all to @example (not in this PR of course), and later we can add back @dartpad where it makes sense
There was a problem hiding this comment.
I'll remove this section.
| snippet}`. Snippet examples are just written inline in the source, like so: | ||
|
|
||
| ```dart | ||
| /// {@tool dartpad} |
There was a problem hiding this comment.
This one is dartpad in the snippet docs.
There was a problem hiding this comment.
Removed. Also I think we had this mistake live for a long time in https://github.com/flutter/flutter/blob/master/examples/api/README.md 😊
| without crashing. Functionality tests are required the examples, and generally | ||
| just do what is normally done for writing tests. The one thing that makes it | ||
| more challenging to do for examples is that they can't really be written for | ||
| testability in any obvious way, since that would complicate the examples and | ||
| make them harder to explain. |
There was a problem hiding this comment.
| without crashing. Functionality tests are required the examples, and generally | |
| just do what is normally done for writing tests. The one thing that makes it | |
| more challenging to do for examples is that they can't really be written for | |
| testability in any obvious way, since that would complicate the examples and | |
| make them harder to explain. | |
| without crashing. Test coverage is required for examples, but should take care not to complicate the example strictly for the purpose of testing. |
| flutter_driver: | ||
| sdk: flutter | ||
| flutter_goldens: | ||
| sdk: flutter |
There was a problem hiding this comment.
This should not use flutter_goldens from flutter/flutter.
| flutter_driver: | ||
| sdk: flutter | ||
| flutter_goldens: | ||
| sdk: flutter |
There was a problem hiding this comment.
This is flutter_goldens from flutter/flutter. It should use the implementation in flutter/packages
| flutter_goldens: | ||
| path: ../../script/flutter_goldens | ||
| sdk: flutter |
|
|
||
| dev_dependencies: | ||
| file: any |
There was a problem hiding this comment.
Here and the rest, replace anys
|
The Material file structure LGTM. Just for the record, we discussed that we don't want to move the old gen_defaults script to |
|
@QuncCccccc Is there anything I need to change to set up for the new gen_default tool or get rid of stuff for the old script? All of the files with tokens generated by gen_defaults still have that section at the bottom. |
0c30762 to
4088b5e
Compare
|
The commit structure LG this time. I would recommend amending 4088b5e though, to make the first line more descriptive (e.g., "[cupertino_ui,material_ui] Post-import adjustments for new package-based structure"), and to make the body a real summary of what meaningfully changed rather than a raw log of incremental commit messages. (See a1bfadf for example.)
Is this part of the PR description obsolete? I just see the standard
Same; this doesn't seem to match the current state. |
4088b5e to
0d08b30
Compare
|
0d08b30 to
0840d3e
Compare
chunhtai
left a comment
There was a problem hiding this comment.
the structure LGTM besides the open comments. There should be a main.dart in example which will be used by the pub dev. but that can wait until the first release
| - "temporarily_disabled_tests/**" | ||
|
|
||
| formatter: | ||
| page_width: 100 |
There was a problem hiding this comment.
is this still needed that the repo is 100 width across?
| - "temporarily_disabled_tests/**" | ||
|
|
||
| formatter: | ||
| page_width: 100 |
|
|
||
| environment: | ||
| sdk: ^3.12.0 | ||
| resolution: workspace |
There was a problem hiding this comment.
Unless you've specifically set up workspaces at the package level, this should be removed.
There was a problem hiding this comment.
I did, I've got this line in both of the main pubspecs:
workspace:
- exampleThis is how it was done in the main flutter/flutter repo. It seems useful especially since these example packages import their parent packages. But if there's a downside let me know.
There was a problem hiding this comment.
I don't want to do anything risky with this PR so if it's easier to just remove it and think about this later then I'm happy to do so.
There was a problem hiding this comment.
I don't know of any downside offhand since I haven't really experimented with them yet. If it works, that's fine (we can alway remove it later if we find problems). I just wanted to make sure it wasn't accidental holdover from the mega-workspace in flutter/flutter.
| sdk: ^3.12.0 | ||
| flutter: ">=3.44.0" | ||
|
|
||
| workspace: |
There was a problem hiding this comment.
Same here and anywhere else; we should remove any workspace entries unless you are deliberately configuring them. We currently don't use workspaces anywhere else in this repo (it's something that I plan to look into at some point, but haven't yet.)
0840d3e to
bfe1ef4
Compare
…sed structure. A single squashed commit of all work after copying the Material and Cupertino libraries, and related code, into material_ui and cupertino_ui. Puts the code in the right place and sets it all up properly in the new repo so that it passes CI. * Copied code was moved to material_ui and cupertino_ui. * Imports of flutter/material.dart and flutter/cupertino.dart were changed to material_ui/material_ui.dart and cupertino_ui/cupertino_ui.dart, respectively. * Relative imports were updated to new paths or packages to work in their new location. * The flutter_goldens package was referenced from script/flutter_goldens instead of the flutter/flutter sdk version. * Dependencies referenced with `any` version were updated to the caret version in flutter/flutter's lock file. * Examples were set up as their own packages in the `example` directory. * READMEs were updated to be consistent with the new setup. * Pubspecs were updated to work with the new setup. Set to Flutter 3.44.0, which is the stable version first containing the code freeze. * Dart data-driven fixes were set up in the fix_data directories along with their tests in the test_fixes directories. * Doc imports were updated to work in the new setup. * One dart fix test was removed since it was already tested in flutter/flutter's widgets library. * The drag_target dart fix was deleted and kept in flutter/flutter. * Other widgets-only dart fixes were deleted in cupertino_ui for the same reason. * Tests with cross imports were skipped and moved to the temporarily_skipped_tests directories, to be fixed before 1.0.0. * Formatting was adjusted to pass analysis here. * A usage of flutter_test's byTooltip finder was removed since it contains a cross import of material. * License headers were updated to match this repository. * Batch release was disabled for now (until we're ready to release 1.0.0). * Exceptions were added for some pinned dependencies that came from flutter/flutter. * Some fixes and skips were added to the example tests in order to be able to run them on Chrome. It seems that these tests were never run on web in flutter/flutter.
bfe1ef4 to
7ffe1f1
Compare
I've created an issue for the examples: flutter/flutter#187942 |
For new gen_default tool, nothing needed to change or setup ahead of time. We will later land this PR in For old script, nothing needed to get rid of in this PR. The defaults should be gradually migrated to use the new gen_defaults. But we should not remove anything for now. |

A recreate of #11669 by recopying all flutter/flutter stuff from scratch, and cherry picking all of my subsequent commits.
This is a single super mega PR attempting to migrate all Material and Cupertino code from flutter/flutter to material_ui and cupertino_ui.
How the PR was created
I then cherry picked everything I could from the previous PR (#11669), skipping merge commits.
What was included in the copy
TODOs
package:flutter_api_samplesimport).git blameappears the same in both repos on various files. (Yes, but the SHAs are different, as expected.)FixSkip all test cross imports.Open questions
Are we sure about the directory structure?Do we like the examples setup?How to try using these packages
Add the local packages to your project:
Then import the packages instead of the libraries in the SDK:
How to review this PR
flutter/material.darttomaterial_ui/material_ui.dartand the equivalent for Cupertino.And let me know if there is any code that's not in this PR that you expected to be. It will be best to get everything we can in this one PR rather than following up later in order to prevent fragmenting commits.
Resources
git filter-repocommands.