Skip to content

[material_ui] Add Material 3 Expressive OutlinedButton - #13724

Draft
QuncCccccc wants to merge 3 commits into
flutter:mainfrom
QuncCccccc:outlined_button_m3e
Draft

QuncCccccc wants to merge 3 commits into
flutter:mainfrom
QuncCccccc:outlined_button_m3e

Conversation

@QuncCccccc

@QuncCccccc QuncCccccc commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

This PR is to add Material 3 Expressive support to OutlinedButton. As with ElevatedButton (#13084), apps opt in with OutlinedButtonThemeData(variant: StyleVariant.material3Expressive). Without it, OutlinedButton keeps the Material 3 style.

With Material 3 Expressive, outlined buttons support:

  • Sizes (ButtonStyle.sizeVariant): extra small through extra large. Each size has its own height, padding, icon size, label text style, outline width, and gap between the icon and the label.
  • Shapes (ButtonStyle.shapeVariant): round and square, including the pressed shape and the shape change when a toggle button is selected.
  • Toggle buttons: a button with a non-null isSelected is selectable. When isSelected is true, it uses the selected colors and selected semantics, and the outline is removed.

The defaults are generated from the Material Design tokens by ButtonTemplateM3E. The outline uses the outline variant color in every state. A disabled button's container is transparent unless the button is a selected toggle button, because md.comp.button.outlined.selected.disabled.container.color is the only disabled container color token for outlined buttons.

New APIs:

  • OutlinedButtonThemeData.variant and OutlinedButtonTheme.variantOf. A theme that doesn't specify variant inherits it from the enclosing themes, the same way as ElevatedButtonThemeData.variant.
  • isSelected for OutlinedButton and OutlinedButton.icon.
  • sizeVariant and shapeVariant parameters for OutlinedButton.styleFrom.

Material 3 Expressive OutlinedButton sizes, shapes, toggle buttons, and disabled buttons

Part of flutter/flutter#184937

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

@github-actions github-actions Bot added p: material_ui triage-design Should be looked at in design triage labels Nov 19, 2026
@QuncCccccc QuncCccccc added the CICD Run CI/CD label Nov 19, 2026
Each iteration changes the theme-level size, and before the theme animation finishes the button still uses the previous size, so the test only built xSmall buttons.
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.

1 participant