[material_ui, cupertino_ui] Rename macro names to package names#12198
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates documentation template and macro references across the cupertino_ui and material_ui packages, replacing the flutter.cupertino and flutter.material prefixes with cupertino_ui and material_ui respectively. The review feedback identifies a few incorrect macro and template references, including an incorrect macro reference for SimpleDialog.alignment and a duplicate template name for CupertinoTextSelectionToolbarButton.buttonItem.
| final Iterable<String>? autofillHints; | ||
|
|
||
| /// {@template flutter.cupertino.Material.clipBehavior} | ||
| /// {@template cupertino_ui.Material.clipBehavior} |
There was a problem hiding this comment.
This one might be wonky, not super urgent, but Material is not defined in cupertino
There was a problem hiding this comment.
Oh yeah. This was probably due to the last rename. I think it doesn't need to belong to Material., but just the general clipBehavior.
| /// {@macro flutter.widgets.editableText.keyboardType} | ||
| final TextInputType keyboardType; | ||
|
|
||
| /// {@template flutter.widgets.TextField.textInputAction} |
There was a problem hiding this comment.
Would this template also conflict with framework/material?
There was a problem hiding this comment.
You're totally right! I should definitely change them. Actually I should change all template names. I'll prepare a PR soon.
| /// for the given use case. See the subclass documentation for details. | ||
| final Color? backgroundColor; | ||
|
|
||
| /// {@template flutter.progress_indicator.ProgressIndicator.color} |
There was a problem hiding this comment.
Would instances of flutter.progress_indicator.ProgressIndicator cause conflicts with flutter/material? There are a few below this one.
This PR follows up the comment under #12198, and renames all remaining `@template`s so that no templates conflict with the framework. Note: The templates in `generated_cupertino_localizations.dart` and `generated_material_localizations.dart` have been left as-is for now, as these files are auto-generated. A separate migration of the generation script will be required to address those specific instances. ## 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 PR renames macros used by l10n. For why the rename is needed, see #12198. ## 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.
…er#189659) flutter/packages@9f95026...4fdc766 2026-07-17 [email protected] [pigeon] allow empty class (flutter/packages#12181) 2026-07-16 [email protected] [material_ui, cupertino_ui] Rename l10n macros (flutter/packages#12211) 2026-07-16 [email protected] [ci] Remove manual SwiftPM enabling step (flutter/packages#12204) 2026-07-16 [email protected] [google_maps_flutter] Fix XCUITest on stable (flutter/packages#12214) 2026-07-16 [email protected] [google_maps_flutter] Convert XCUITests to Swift (flutter/packages#12208) 2026-07-16 [email protected] [material_ui] Rename the remaining templates (flutter/packages#12210) 2026-07-15 [email protected] [material_ui, cupertino_ui] Rename macro names to package names (flutter/packages#12198) 2026-07-15 [email protected] [material_ui] Fix upstream localization test (flutter/packages#12207) 2026-07-15 [email protected] [material_ui, cupertino_ui] Localizations (flutter/packages#12119) 2026-07-15 [email protected] fix(ci): harden some workflows in packages (flutter/packages#12178) 2026-07-15 [email protected] Roll Flutter from 846664b to fc1ad95 (18 revisions) (flutter/packages#12203) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
This PR rename macro names from
flutter.material.*tomaterial_ui.*, andflutter.cupertino.*tocupertino_ui.*.These changes are not only aesthetic, but also functionally necessary, because the current macro names are also present in the Flutter framework. Since the
dartdocalso read the framework, it will treat all macros/templates of the same name as duplicate entries, and will always display the macro content from the Flutter framework.For example, the following screenshot shows the page of

cupertino_ui.CupertinoCheckbox.fillColoras of 745da2e .Despite that we have long migrated it away from
@tool snippet,packages/packages/cupertino_ui/lib/src/checkbox.dart
Lines 211 to 230 in 745da2e
they still show
@tool snippetbecausedartdocreplaces thecupertino_uidoc with the content fromflutter/cupertino(link).This issue is fixed after this PR.
Pre-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