From 4f5ba5e6382338dc61aee5c0b4edb107f81c44f7 Mon Sep 17 00:00:00 2001 From: Taha Tesser Date: Fri, 26 Apr 2024 07:38:22 +0300 Subject: [PATCH] Fix `FloatingActionButton` docs for `background` and `foreground` properties (#147372) fixes [Material 3 `FloatingActionButton` background/foreground docs are inconsistent](https://github.com/flutter/flutter/issues/147368) --- .../src/material/floating_action_button.dart | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/packages/flutter/lib/src/material/floating_action_button.dart b/packages/flutter/lib/src/material/floating_action_button.dart index 06aed53f5a..d4005ccf62 100644 --- a/packages/flutter/lib/src/material/floating_action_button.dart +++ b/packages/flutter/lib/src/material/floating_action_button.dart @@ -266,19 +266,20 @@ class FloatingActionButton extends StatelessWidget { /// The default foreground color for icons and text within the button. /// - /// If this property is null, then the - /// [FloatingActionButtonThemeData.foregroundColor] of - /// [ThemeData.floatingActionButtonTheme] is used. If that property is also - /// null, then the [ColorScheme.onSecondary] color of [ThemeData.colorScheme] - /// is used. + /// If this property is null, then the [FloatingActionButtonThemeData.foregroundColor] + /// of [ThemeData.floatingActionButtonTheme] is used. If that property is also + /// null, then the [ColorScheme.onPrimaryContainer] color of [ThemeData.colorScheme] + /// is used. If [ThemeData.useMaterial3] is set to false, then the + /// [ColorScheme.onSecondary] color of [ThemeData.colorScheme] is used. final Color? foregroundColor; /// The button's background color. /// - /// If this property is null, then the - /// [FloatingActionButtonThemeData.backgroundColor] of - /// [ThemeData.floatingActionButtonTheme] is used. If that property is also - /// null, then the [Theme]'s [ColorScheme.secondary] color is used. + /// If this property is null, then the [FloatingActionButtonThemeData.backgroundColor] + /// of [ThemeData.floatingActionButtonTheme] is used. If that property is also + /// null, then the [ColorScheme.primaryContainer] color of [ThemeData.colorScheme] + /// is used. If [ThemeData.useMaterial3] is set to false, then the + /// [ColorScheme.secondary] color of [ThemeData.colorScheme] is used. final Color? backgroundColor; /// The color to use for filling the button when the button has input focus.