Skip to content

[material_ui] Migrate M3 Badge template to use new gen_defaults#12218

Draft
QuncCccccc wants to merge 2 commits into
flutter:m3e_migrationfrom
QuncCccccc:badge_m3_defaults_migration
Draft

[material_ui] Migrate M3 Badge template to use new gen_defaults#12218
QuncCccccc wants to merge 2 commits into
flutter:m3e_migrationfrom
QuncCccccc:badge_m3_defaults_migration

Conversation

@QuncCccccc

Copy link
Copy Markdown
Contributor

Fixes flutter/flutter#188401

Pre-Review Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools.
  • I read the [Tree Hygiene] page, which explains my responsibilities.
  • I read and followed the [relevant style guides] and ran [the auto-formatter].
  • I signed the [CLA].
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I [linked to at least one issue that this PR fixes] in the description above.
  • I followed [the version and CHANGELOG instructions], using [semantic versioning] and the [repository CHANGELOG style], or I have commented below to indicate which documented exception this PR falls under[^1].
  • I updated/added any relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or I have commented below to indicate which [test exemption] this PR falls under[^1].
  • All existing and new tests are passing.

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jul 16, 2026
@github-actions github-actions Bot added triage-framework Should be looked at in framework triage p: material_ui labels Jul 16, 2026

@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 migrates the Badge component to use the gen_defaults tool for generating default values. It introduces a new BadgeTemplateM3, a generated badge_defaults_m3.g.dart file, and updates the generator script and test suite accordingly. The reviewer suggested further improving maintainability by tokenizing the currently hardcoded padding, alignment, and textStyle properties.

@QuncCccccc
QuncCccccc force-pushed the badge_m3_defaults_migration branch 3 times, most recently from 0dc804e to 8bbc763 Compare July 16, 2026 21:46
@QuncCccccc
QuncCccccc requested a review from elliette July 16, 2026 21:49
@QuncCccccc
QuncCccccc force-pushed the badge_m3_defaults_migration branch from 8bbc763 to 1cd49ad Compare July 16, 2026 23:40
@QuncCccccc
QuncCccccc removed the request for review from elliette July 16, 2026 23:48
@QuncCccccc
QuncCccccc marked this pull request as draft July 16, 2026 23:48
@QuncCccccc

Copy link
Copy Markdown
Contributor Author

Not ready for review because of the text style token issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

1 participant