Skip to content

[material_ui] Add M3E IconButton example - #13085

Merged
auto-submit[bot] merged 11 commits into
flutter:mainfrom
QuncCccccc:icon_button_m3e_example
Oct 16, 2026
Merged

auto-submit[bot] merged 11 commits into
flutter:mainfrom
QuncCccccc:icon_button_m3e_example

Conversation

@QuncCccccc

@QuncCccccc QuncCccccc commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Adds an API example for the Material 3 Expressive IconButton support added in #12832, and links it from the IconButton docs.

The example opts in with IconButtonThemeData(variant: StyleVariant.material3Expressive) and shows:

  • Sizes (ButtonStyle.sizeVariant): extra small through extra large
  • Widths (ButtonStyle.iconButtonWidth): narrow, standard, and wide
  • Shapes (ButtonStyle.shapeVariant): round and square, including the shape change when a toggle button is selected
  • Disabled buttons, unselected and selected

It also makes this example the "Icon buttons" entry in the example gallery app (example/lib/main.dart), replacing the old icon_button.3.dart.

Example Toggling buttons
Material 3 Expressive IconButton example Toggling Material 3 Expressive icon buttons

Part of flutter/flutter#184940

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

@QuncCccccc QuncCccccc added the CICD Run CI/CD label Sep 30, 2026
@github-actions github-actions Bot added p: material_ui triage-design Should be looked at in design triage labels Sep 30, 2026
@QuncCccccc
QuncCccccc marked this pull request as ready for review October 14, 2026 19:38
@QuncCccccc
QuncCccccc requested review from Piinks and elliette October 14, 2026 19:38

@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 adds a new Material 3 Expressive IconButton example (icon_button.4.dart) showcasing size, width, shape variants, and disabled states, and includes corresponding widget tests. The main example app, main tests, and IconButton documentation are updated to reference this new example. Feedback suggests improving the readability of the toggle logic in the example code by using an explicit contains check instead of relying on the return value of Set.add.

@Piinks Piinks 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 with nit

@QuncCccccc QuncCccccc added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 15, 2026
@auto-submit
auto-submit Bot merged commit b7e553a into flutter:main Oct 16, 2026
13 checks passed
gmackall pushed a commit to gmackall/flutter that referenced this pull request Oct 16, 2026
flutter/packages@da40eaf...93eede7

2026-10-16 [email protected] [camera]fix a
crash when switching camera while recording due to disconnected
capturePhotoOputput (flutter/packages#13248)
2026-10-16 [email protected] [various] Update iOS example apps to
the 15.0 deployment target (flutter/packages#13223)
2026-10-16 [email protected] [material_ui]
Add M3E `IconButton` example (flutter/packages#13085)
2026-10-15 [email protected] [ci] Increase deprecation check minimum to
iOS 16 (flutter/packages#13211)
2026-10-15 [email protected] [google_sign_in] Remove the
public iOS handleOpen helper (flutter/packages#13273)
2026-10-15 [email protected] [google_fonts] Make the pendingFonts
test deterministic (flutter/packages#13262)
2026-10-15 [email protected]
[vector_graphics_compiler] Fix tspan transform applied twice
(flutter/packages#13129)
2026-10-15 [email protected] Roll Flutter from
426be96 to 5c7e45a (21 revisions) (flutter/packages#13270)
2026-10-15 [email protected] [flutter_svg]
Add golden widget tests for SVG alpha masks (flutter/packages#13245)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
suryaKommana2662 pushed a commit to suryaKommana2662/flutter that referenced this pull request Oct 29, 2026
flutter/packages@da40eaf...93eede7

2026-10-16 [email protected] [camera]fix a
crash when switching camera while recording due to disconnected
capturePhotoOputput (flutter/packages#13248)
2026-10-16 [email protected] [various] Update iOS example apps to
the 15.0 deployment target (flutter/packages#13223)
2026-10-16 [email protected] [material_ui]
Add M3E `IconButton` example (flutter/packages#13085)
2026-10-15 [email protected] [ci] Increase deprecation check minimum to
iOS 16 (flutter/packages#13211)
2026-10-15 [email protected] [google_sign_in] Remove the
public iOS handleOpen helper (flutter/packages#13273)
2026-10-15 [email protected] [google_fonts] Make the pendingFonts
test deterministic (flutter/packages#13262)
2026-10-15 [email protected]
[vector_graphics_compiler] Fix tspan transform applied twice
(flutter/packages#13129)
2026-10-15 [email protected] Roll Flutter from
426be96 to 5c7e45a (21 revisions) (flutter/packages#13270)
2026-10-15 [email protected] [flutter_svg]
Add golden widget tests for SVG alpha masks (flutter/packages#13245)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App 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