Skip to content

Fix FilledButton Material 3 default style docs - #191721

Closed
saurabh-mirajkar wants to merge 1 commit into
flutter:masterfrom
saurabh-mirajkar:fix-filled-button-docs-191556
Closed

saurabh-mirajkar wants to merge 1 commit into
flutter:masterfrom
saurabh-mirajkar:fix-filled-button-docs-191556

Conversation

@saurabh-mirajkar

Copy link
Copy Markdown
Contributor

Fixes #191556

Description

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

The documentation currently describes the tonal variant colors (secondaryContainer / onSecondaryContainer), while the implementation uses primary / onPrimary.

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

Tests

  • Docs-only change.
  • Ran dart format packages/flutter/lib/src/material/filled_button.dart.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

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.

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Aug 25, 2026
@github-actions

Copy link
Copy Markdown

This pull request contains changes to Material or Cupertino, which are currently frozen in this repository.

Changes should be made in material_ui and/or cupertino_ui in the flutter/packages repository.

Please refer to #188444 for instructions.

@github-actions github-actions Bot added framework flutter/packages/flutter repository. See also f: labels. p: material_ui material_ui package in flutter/packages labels Aug 25, 2026

@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 filled_button.dart to reflect changes in the default color scheme values. Specifically, it updates the documented default colors for backgroundColor, foregroundColor, and overlayColor from using the secondary container color scheme to the primary color scheme. There are no review comments, and I have no feedback to provide.

@saurabh-mirajkar

Copy link
Copy Markdown
Contributor Author

Ported this change to flutter/packages as required by the Material decoupling. New PR: flutter/packages#12620

auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Sep 8, 2026
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.
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

CICD Run CI/CD framework flutter/packages/flutter repository. See also f: labels. p: material_ui material_ui package in flutter/packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mistake in api docs

1 participant