Skip to content

[material_ui] Move over more API samples#12092

Merged
auto-submit[bot] merged 3 commits into
flutter:mainfrom
dkwingsmt:migrate_material_move_file
Jul 2, 2026
Merged

[material_ui] Move over more API samples#12092
auto-submit[bot] merged 3 commits into
flutter:mainfrom
dkwingsmt:migrate_material_move_file

Conversation

@dkwingsmt

@dkwingsmt dkwingsmt commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

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:

Pre-Review Checklist

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-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.

Footnotes

  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. 2

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jul 1, 2026
@github-actions github-actions Bot added triage-framework Should be looked at in framework triage p: material_ui labels Jul 1, 2026
@dkwingsmt dkwingsmt requested a review from Piinks July 1, 2026 21:40

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@github-actions github-actions Bot removed the CICD Run CI/CD label Jul 1, 2026
@dkwingsmt dkwingsmt closed this Jul 1, 2026
@dkwingsmt dkwingsmt force-pushed the migrate_material_move_file branch from d0fe151 to a1682d4 Compare July 1, 2026 22:01
@dkwingsmt dkwingsmt deleted the migrate_material_move_file branch July 1, 2026 22:02
@dkwingsmt dkwingsmt restored the migrate_material_move_file branch July 1, 2026 22:02
@dkwingsmt dkwingsmt reopened this Jul 1, 2026
@fluttergithubbot

Copy link
Copy Markdown
Contributor

An existing Git SHA, 22057a8040f13bfa65bcb726739c77602b4a6dbf, was detected, and no actions were taken.

To re-trigger presubmits after closing or re-opeing a PR, or pushing a HEAD commit (i.e. with --force) that already was pushed before, push a blank commit (git commit --allow-empty -m "Trigger Build") or rebase to continue.

@dkwingsmt dkwingsmt changed the title [material_ui] Migrate missing api sample code [material_ui] Move over more API samples Jul 1, 2026
@dkwingsmt dkwingsmt added the CICD Run CI/CD label Jul 1, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label Jul 1, 2026
@dkwingsmt dkwingsmt added the CICD Run CI/CD label Jul 1, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label Jul 1, 2026
@dkwingsmt dkwingsmt added the CICD Run CI/CD label Jul 1, 2026
@Piinks

Piinks commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Ah the period I included is not meant to be there in the license header 😓

@Piinks

Piinks commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Sorry 😞

@dkwingsmt dkwingsmt force-pushed the migrate_material_move_file branch from 652cb8b to a7d56ab Compare July 1, 2026 23:27
@github-actions github-actions Bot removed the CICD Run CI/CD label Jul 1, 2026
@dkwingsmt dkwingsmt added the CICD Run CI/CD label Jul 1, 2026

@Piinks Piinks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 1, 2026
@auto-submit auto-submit Bot merged commit c7025f0 into flutter:main Jul 2, 2026
88 checks passed
auto-submit Bot pushed a commit that referenced this pull request Jul 2, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD p: material_ui triage-framework Should be looked at in framework triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants