You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 15e15cc
Browse filesBrowse the repository at this point in the historyBrowse files
[material_ui] Add Material 3 Expressive IconButton (flutter#12832)
This PR is to port flutter/packages#12093 which was created in `m3e_migration` feature branch.
### The original PR description
This PR is to add Material 3 Expressive IconButton support behind an explicit component-level opt-in.
This PR adds:
* 3 new `ButtonStyle` properties used by the IconButton M3E migration:
* `sizeVariant`
* `iconButtonWidth`
* `shapeVariant`
* `IconButtonThemeData.variant` so `IconButtons` can opt into `StyleVariant.material3Expressive`.
* `IconButtonTemplateM3E` to generate `IconButton` defaults from the M3E token data.
* Adds the generated M3E `IconButton` defaults in:
* `packages/material_ui/lib/src/generated/icon_button_defaults_m3e.g.dart`
* Material 3 Expressive defines an extra-small IconButton with a 32dp visual container while retaining a 48dp interaction target. `ThemeData.materialTapTargetSize` defaults to `shrinkWrap` on desktop, so inheriting it would reduce the interaction target to 32dp. M3E therefore defaults to `MaterialTapTargetSize.padded`. Applications can still override ButtonStyle.tapTargetSize explicitly.
### TODO:
* I'll add a separate PR/demo showing the Material 3 Expressive IconButton variants.
* Will also update IconButton shape morphing to use physics-based motion animation.
<img width="1858" height="1514" alt="image" src="https://github.com/user-attachments/assets/1914ca8e-a1e2-4881-aa9b-083f26d44b50" />
## Pre-Review Checklist
0 commit comments