Skip to content

Commit 203ddb4

Browse files
authored
Add Material style variant enum (flutter#12221) (flutter#12717)
Work towards flutter#191088 **Ports over flutter/packages#12221 which landed on the `m3e_migration` feature branch.** ### Original PR description 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 **Text exemption:** Adds an enum, no change behavior. **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.
1 parent 0099ae1 commit 203ddb4

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

‎packages/material_ui/lib/src/theme_data.dart‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,23 @@ enum MaterialTapTargetSize {
194194
shrinkWrap,
195195
}
196196

197+
/// Defines the Material Design style variant used by Material components.
198+
enum StyleVariant {
199+
/// The Material Design 3 style variant.
200+
material3,
201+
202+
/// The Material Design 3 Expressive style variant.
203+
///
204+
/// Material 3 Expressive support is under development. Apps or components
205+
/// that opt into this variant may see visual changes as more Expressive
206+
/// features get added.
207+
///
208+
/// See also:
209+
///
210+
/// * [Material Design 3 Expressive updates](https://m3.material.io/#9f2db05b-ebbb-47c2-892d-1cca35afa386) for design guidelines.
211+
material3Expressive,
212+
}
213+
197214
/// Defines the configuration of the overall visual [Theme] for a [MaterialApp]
198215
/// or a widget subtree within the app.
199216
///
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
changelog: |
2+
- Adds the `StyleVariant` enum defining the Material 3 and Material 3 Expressive style variants.
3+
version: minor

0 commit comments

Comments
 (0)