Repository navigation
Closed
flutter/packages
#12620Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listd: api docsIssues with https://api.flutter.dev/Issues with https://api.flutter.dev/p: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Description
defaultStyleOf doc comment on FilledButton shows backgroundColor: secondaryContainer, but the actual _FilledButtonDefaultsM3 implementation uses colorScheme.primary the doc comment appears to describe the tonal variant instead
Link the exact file: packages/flutter/lib/src/material/filled_button.dart
@override
WidgetStateProperty<Color?>? get backgroundColor =>
WidgetStateProperty.resolveWith((Set<WidgetState> states) {
if (states.contains(WidgetState.disabled)) {
return _colors.onSurface.withOpacity(0.12);
}
return _colors.primary; <====
});Material 3 defaults
backgroundColor
disabled - Theme.colorScheme.onSurface(0.12)
others - Theme.colorScheme.secondaryContainer <====
just a mistake in docs
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listd: api docsIssues with https://api.flutter.dev/Issues with https://api.flutter.dev/p: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Activity
suryaKommana2662 commentedon Aug 24, 2026
@mohamed-tamerrr Thanks for the report. This appears to be a discrepancy between the
FilledButton.defaultStyleOfAPI documentation and the currentMaterial 3implementation. Routing this toteam-designfor further investigatioin.piedcipher commentedon Aug 24, 2026
Same issue for foregroundColor as well
flutter/packages/flutter/lib/src/material/filled_button.dart
Line 556 in 706edcd
flutter/packages/flutter/lib/src/material/filled_button.dart
Line 561 in 706edcd
[material_ui] Fix FilledButton Material 3 default style docs (#12620)
[material_ui] Fix FilledButton Material 3 default style docs (flutter…
[material_ui] Fix FilledButton Material 3 default style docs (flutter…
github-actions commentedon Sep 22, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.