diff --git a/packages/flutter/lib/src/material/button.dart b/packages/flutter/lib/src/material/button.dart index 8033f35d55..6cdc2efacd 100644 --- a/packages/flutter/lib/src/material/button.dart +++ b/packages/flutter/lib/src/material/button.dart @@ -29,7 +29,7 @@ import 'theme_data.dart'; /// TextButton, ElevatedButton, and OutlinedButton respectively. /// ButtonTheme has been replaced by TextButtonTheme, /// ElevatedButtonTheme, and OutlinedButtonTheme. The original classes -/// will be deprecated soon, please migrate code that uses them. +/// have been deprecated, please migrate code that uses them. /// There's a detailed migration guide for the new button and button /// theme classes in /// [flutter.dev/go/material-button-migration-guide](https://flutter.dev/go/material-button-migration-guide). diff --git a/packages/flutter/lib/src/material/button_theme.dart b/packages/flutter/lib/src/material/button_theme.dart index 5d79b00a53..9f14ffd264 100644 --- a/packages/flutter/lib/src/material/button_theme.dart +++ b/packages/flutter/lib/src/material/button_theme.dart @@ -55,8 +55,8 @@ enum ButtonBarLayoutBehavior { /// Please use one or more of the new buttons and their themes /// instead: [TextButton] and [TextButtonTheme], [ElevatedButton] and /// [ElevatedButtonTheme], [OutlinedButton] and -/// [OutlinedButtonTheme]. The original classes will be deprecated -/// soon, please migrate code that uses them. There's a detailed +/// [OutlinedButtonTheme]. The original classes have been deprecated, +/// please migrate code that uses them. There's a detailed /// migration guide for the new button and button theme classes in /// [flutter.dev/go/material-button-migration-guide](https://flutter.dev/go/material-button-migration-guide). /// @@ -179,7 +179,7 @@ class ButtonTheme extends InheritedTheme { /// TextButton, ElevatedButton, and OutlinedButton respectively. /// ButtonTheme has been replaced by TextButtonTheme, /// ElevatedButtonTheme, and OutlinedButtonTheme. The original classes -/// will be deprecated soon, please migrate code that uses them. +/// have been deprecated, please migrate code that uses them. /// There's a detailed migration guide for the new button and button /// theme classes in /// [flutter.dev/go/material-button-migration-guide](https://flutter.dev/go/material-button-migration-guide). diff --git a/packages/flutter/lib/src/material/material_button.dart b/packages/flutter/lib/src/material/material_button.dart index 280ade0a0e..9fb5522234 100644 --- a/packages/flutter/lib/src/material/material_button.dart +++ b/packages/flutter/lib/src/material/material_button.dart @@ -28,7 +28,7 @@ import 'theme_data.dart'; /// new widgets can be customized by specifying a [ButtonStyle] /// or by creating a one-off style using a `styleFrom` method like /// [TextButton.styleFrom]. The original button classes -/// will be deprecated soon, please migrate code that uses them. +/// have been deprecated, please migrate code that uses them. /// There's a detailed migration guide for the new button and button /// theme classes in /// [flutter.dev/go/material-button-migration-guide](https://flutter.dev/go/material-button-migration-guide). @@ -177,8 +177,6 @@ class MaterialButton extends StatelessWidget { /// The button's fill color, displayed by its [Material], while it /// is in its default (unpressed, [enabled]) state. /// - /// The default fill color is the theme's button color, [ThemeData.buttonColor]. - /// /// See also: /// /// * [disabledColor] - the fill color of the button when the button is disabled. diff --git a/packages/flutter/lib/src/material/theme_data.dart b/packages/flutter/lib/src/material/theme_data.dart index f835214fae..ae5d5f85a7 100644 --- a/packages/flutter/lib/src/material/theme_data.dart +++ b/packages/flutter/lib/src/material/theme_data.dart @@ -248,6 +248,10 @@ class ThemeData with Diagnosticable { Color? selectedRowColor, Color? unselectedWidgetColor, Color? disabledColor, + @Deprecated( + 'No longer used by the framework, please remove any reference to it. ' + 'This feature was deprecated after v2.3.0-0.2.pre.', + ) Color? buttonColor, ButtonThemeData? buttonTheme, ToggleButtonsThemeData? toggleButtonsTheme, @@ -585,6 +589,10 @@ class ThemeData with Diagnosticable { required this.unselectedWidgetColor, required this.disabledColor, required this.buttonTheme, + @Deprecated( + 'No longer used by the framework, please remove any reference to it. ' + 'This feature was deprecated after v2.3.0-0.2.pre.', + ) required this.buttonColor, required this.toggleButtonsTheme, required this.secondaryHeaderColor, @@ -991,6 +999,10 @@ class ThemeData with Diagnosticable { final ToggleButtonsThemeData toggleButtonsTheme; /// The default fill color of the [Material] used in [RaisedButton]s. + @Deprecated( + 'No longer used by the framework, please remove any reference to it. ' + 'This feature was deprecated after v2.3.0-0.2.pre.', + ) final Color buttonColor; /// The color of the header of a [PaginatedDataTable] when there are selected rows. @@ -1336,6 +1348,10 @@ class ThemeData with Diagnosticable { Color? disabledColor, ButtonThemeData? buttonTheme, ToggleButtonsThemeData? toggleButtonsTheme, + @Deprecated( + 'No longer used by the framework, please remove any reference to it. ' + 'This feature was deprecated after v2.3.0-0.2.pre.', + ) Color? buttonColor, Color? secondaryHeaderColor, @Deprecated( diff --git a/packages/flutter/test/material/snack_bar_test.dart b/packages/flutter/test/material/snack_bar_test.dart index 934ec98bce..fd055ef53f 100644 --- a/packages/flutter/test/material/snack_bar_test.dart +++ b/packages/flutter/test/material/snack_bar_test.dart @@ -706,7 +706,6 @@ void main() { disabledColor: Colors.black, buttonTheme: const ButtonThemeData(colorScheme: ColorScheme.dark()), toggleButtonsTheme: const ToggleButtonsThemeData(textStyle: TextStyle(color: Colors.black)), - buttonColor: Colors.black, secondaryHeaderColor: Colors.black, textSelectionColor: Colors.black, cursorColor: Colors.black,