[material_ui] Move over more API samples#12092
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds new example applications and tests for TextField custom magnifiers and tap regions, updating the inline documentation in text_field.dart to reference these examples. Feedback on the changes highlights a critical issue where a TextEditingController is instantiated inside a StatelessWidget's build method, which can cause state resets and memory leaks. Additionally, it is recommended to declare the controller as final in the tap region example, remove unused generic type parameters in the magnifier tests, and avoid relying on the private _Editable class name in the tap region tests.
d0fe151 to
a1682d4
Compare
|
An existing Git SHA, To re-trigger presubmits after closing or re-opeing a PR, or pushing a HEAD commit (i.e. with |
|
Ah the period I included is not meant to be there in the license header 😓 |
|
Sorry 😞 |
652cb8b to
a7d56ab
Compare
…12078) Migrates @tool directives to @example in material_ui Towards flutter/flutter#172936 and flutter/flutter#172937 Prerequisite: * #12092, which moves missing sample files. Related: * #12063, which migrates `cupertino_ui` ## Pre-Review Checklist **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. [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
This adds missing samples referenced in the material_ui API docs.
Some of these were misplaced in the widgets/ API directory in flutter/flutter, I will push up a PR to reflect the move there as well so we do not lose track of it.
Towards flutter/flutter#172936 and flutter/flutter#172937
Related:
material_uiand depends on this PR.cupertino_uiPre-Review Checklist
[shared_preferences]///).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. Comments from the
gemini-code-assistbot 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.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2