Skip to content

Add Material style variant enum (#12221) - #12717

Open
elliette wants to merge 3 commits into
flutter:mainfrom
elliette:port-pr-12221
Open

Add Material style variant enum (#12221)#12717
elliette wants to merge 3 commits into
flutter:mainfrom
elliette:port-pr-12221

Conversation

@elliette

@elliette elliette commented Sep 1, 2026

Copy link
Copy Markdown
Member

Work towards flutter/flutter#191088

Ports over #12221 which landed on the m3e_migration feature branch.

Original PR description

Related to Bring Material 3 Expressive to Flutter

This PR is just to add the StyleVariant enum so we can start migrating individual components.

Pre-Review Checklist

Text exemption: Adds an enum, no change behavior.

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

Related to https://github.com/orgs/flutter/projects/250

This PR is just to add the `StyleVariant` enum so we can start migrating
individual components.

## Pre-Review Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] page, which explains my
responsibilities.
- [x] I read and followed the [relevant style guides] and ran [the
auto-formatter].
- [x] I signed the [CLA].
- [x] The title of the PR starts with the name of the package surrounded
by square brackets, e.g. `[shared_preferences]`
- [x] I [linked to at least one issue that this PR fixes] in the
description above.
- [x] 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].
- [x] I updated/added any relevant documentation (doc comments with
`///`).
- [x] 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].
- [x] All existing and new tests are passing.
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Sep 1, 2026
@flutter-dashboard

Copy link
Copy Markdown

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@github-actions github-actions Bot added p: material_ui triage-design Should be looked at in design triage labels Sep 1, 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 introduces a new StyleVariant enum to define the Material Design style variant used by Material components, adding options for material3 and material3Expressive. Feedback was provided to adjust the formatting of the documentation's 'See also' section for consistency with Flutter's style guidelines.

Comment on lines +208 to +210
/// See also:
///
/// * the [Material Design 3 Expressive updates](https://m3.material.io/#9f2db05b-ebbb-47c2-892d-1cca35afa386) for design guidelines.

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.

medium

For consistency with the rest of the file and Flutter's documentation style, the bullet point in the "See also" section should have two spaces of indentation before the asterisk, and the link text should be capitalized directly without the leading lowercase "the".

  /// See also:
  ///
  ///  * [Material Design 3 Expressive updates](https://m3.material.io/#9f2db05b-ebbb-47c2-892d-1cca35afa386) for design guidelines.

@QuncCccccc QuncCccccc 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! Thanks a lot for helping porting these PRs over and addressing the AI review feedback. Really appreciated!

@@ -0,0 +1,3 @@
changelog: |
- Adds the `StyleVariant` enum defining the Material 3 and Material 3 Expressive style variants.
version: skip

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.

Seems the Linux repo_checks is failed, should we change this to minor because we added a new API or add a no version label?

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-design Should be looked at in design triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants