Skip to content

[material_ui] Fix FilledButton Material 3 default style docs - #12620

Merged
auto-submit[bot] merged 3 commits into
flutter:mainfrom
saurabh-mirajkar:fix-filled-button-docs-191556
Sep 8, 2026
Merged

auto-submit[bot] merged 3 commits into
flutter:mainfrom
saurabh-mirajkar:fix-filled-button-docs-191556

Conversation

@saurabh-mirajkar

Copy link
Copy Markdown
Contributor

Fixes flutter/flutter#191556

This is the port of flutter/flutter#191721 following the Material/Cupertino decoupling.

Description

The Material 3 defaults documented in FilledButton.defaultStyleOf did not match the values used by _FilledButtonDefaultsM3.

The documentation described the tonal variant colors (secondaryContainer / onSecondaryContainer) and corresponding overlay colors, while the implementation uses primary / onPrimary.

This updates the Material 3 defaults documentation to match the existing implementation.

Tests

  • Ran dart format packages/material_ui/lib/src/filled_button.dart.
  • No tests added as this is a documentation-only change.

Original Flutter PR: flutter/flutter#191721

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

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Aug 25, 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.

@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 updates the documentation for FilledButton in packages/material_ui/lib/src/filled_button.dart to correctly reflect its Material 3 default style implementation, changing references from secondaryContainer and onSecondaryContainer to primary and onPrimary respectively. Additionally, a pending changelog entry is added to document this fix. There are no review comments, and I have no feedback to provide.

@stuartmorgan-g

Copy link
Copy Markdown
Collaborator

test-exempt: comment-only change

Comment thread packages/material_ui/lib/src/filled_button.dart Outdated
Comment thread packages/material_ui/lib/src/filled_button.dart Outdated

@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 your contribution!

@QuncCccccc
QuncCccccc requested a review from elliette September 8, 2026 21:35
@QuncCccccc QuncCccccc added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 8, 2026
@auto-submit
auto-submit Bot merged commit 2af77ad into flutter:main Sep 8, 2026
13 checks passed
pull Bot pushed a commit to Mattlk13/flutter that referenced this pull request Sep 9, 2026
…er#192485)

flutter/packages@9af9c60...36e088a

2026-09-09 [email protected] [quick_actions] Adopt code-excerpts
for README (flutter/packages#12643)
2026-09-08 [email protected] [camera_web] Fix
TypeError when reading the torch capability (flutter/packages#12647)
2026-09-08 [email protected] [google_maps_flutter_web] Avoid
replacing advanced marker content on move (flutter/packages#11952)
2026-09-08 [email protected] [material_ui][cupertino_ui] Change issue
tracker label in pubspec.yaml (flutter/packages#12792)
2026-09-08 [email protected] [material_ui] Fix FilledButton
Material 3 default style docs (flutter/packages#12620)
2026-09-08 [email protected] [infra] Use a
modified no-response workflow in flutter/packages
(flutter/packages#12745)
2026-09-08 [email protected] [material_ui]
Migrate M3 Banner template to use new gen_defaults
(flutter/packages#12734)
2026-09-08 [email protected] Roll Flutter from
63170e9 to b444e78 (13 revisions) (flutter/packages#12791)
2026-09-08 [email protected] Sync release-go_router-18.0.1 to
main (flutter/packages#12725)
2026-09-08 [email protected] Sync release-material_ui-1.1.1 to
main (flutter/packages#12726)
2026-09-08 [email protected] [tool] Adopt `platform` 3.2.0
(flutter/packages#12789)
2026-09-07 [email protected] [material_ui] Fix
SliverGeometry maxPaintExtent assertion in CarouselView.weighted
(flutter/packages#12563)
2026-09-05 [email protected] Roll Flutter from
5a6cfa7 to 63170e9 (15 revisions) (flutter/packages#12767)
2026-09-04 [email protected] Manual roll Flutter from
70797e1 to 5a6cfa7 (52 revisions) (flutter/packages#12760)
2026-09-04 [email protected] [material_ui] port drawer tests over
from flutter/widgets (flutter/packages#12711)
2026-09-04 [email protected] add cooldown (flutter/packages#12708)
2026-09-04 [email protected] [in_app_purchase] Support StoreKit 2
introductory offer eligibility JWS (flutter/packages#12584)
2026-09-04 [email protected] [material_ui]
Migrate M3 Badge template to use new gen_defaults
(flutter/packages#12733)
2026-09-04 [email protected] [google_maps_flutter] Convert heatmap
controller to Swift (flutter/packages#12713)
2026-09-04 [email protected] [material_ui] Remove
unused `maintainState` constructor parameter in `scaffold_test.dart`
(flutter/packages#12754)
2026-09-04 [email protected] [video_player_avfoundation]
Route video over AirPlay (flutter/packages#12490)
2026-09-04 [email protected] [google_fonts] Add
google_fonts_lite file to allow tree-shaking of the other huge files
(flutter/packages#11433)
2026-09-04 [email protected] Roll Flutter from
0cbd1a4 to 70797e1 (27 revisions) (flutter/packages#12727)
2026-09-04 [email protected] Update Chrome for stable tests
(flutter/packages#12747)

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
victorsanni pushed a commit to victorsanni/packages that referenced this pull request Sep 9, 2026
…#12620)

Fixes flutter/flutter#191556

This is the port of flutter/flutter#191721 following the Material/Cupertino decoupling.

## Description

The Material 3 defaults documented in `FilledButton.defaultStyleOf` did not match the values used by `_FilledButtonDefaultsM3`.

The documentation described the tonal variant colors (`secondaryContainer` / `onSecondaryContainer`) and corresponding overlay colors, while the implementation uses `primary` / `onPrimary`.

This updates the Material 3 defaults documentation to match the existing implementation.

## Tests
- Ran `dart format packages/material_ui/lib/src/filled_button.dart`.
- No tests added as this is a documentation-only change.

Original Flutter PR: flutter/flutter#191721

## Pre-Review Checklist

**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.
victorsanni pushed a commit to victorsanni/packages that referenced this pull request Sep 9, 2026
…#12620)

Fixes flutter/flutter#191556

This is the port of flutter/flutter#191721 following the Material/Cupertino decoupling.

## Description

The Material 3 defaults documented in `FilledButton.defaultStyleOf` did not match the values used by `_FilledButtonDefaultsM3`.

The documentation described the tonal variant colors (`secondaryContainer` / `onSecondaryContainer`) and corresponding overlay colors, while the implementation uses `primary` / `onPrimary`.

This updates the Material 3 defaults documentation to match the existing implementation.

## Tests
- Ran `dart format packages/material_ui/lib/src/filled_button.dart`.
- No tests added as this is a documentation-only change.

Original Flutter PR: flutter/flutter#191721

## Pre-Review Checklist

**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.
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.

mistake in api docs

3 participants