Unverified Commit 1d8ab0f0 authored by Hans Muller's avatar Hans Muller Committed by GitHub

Deprecated ThemeData buttonColor (#82196)

parent efd3cc5c
...@@ -29,7 +29,7 @@ import 'theme_data.dart'; ...@@ -29,7 +29,7 @@ import 'theme_data.dart';
/// TextButton, ElevatedButton, and OutlinedButton respectively. /// TextButton, ElevatedButton, and OutlinedButton respectively.
/// ButtonTheme has been replaced by TextButtonTheme, /// ButtonTheme has been replaced by TextButtonTheme,
/// ElevatedButtonTheme, and OutlinedButtonTheme. The original classes /// 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 /// There's a detailed migration guide for the new button and button
/// theme classes in /// theme classes in
/// [flutter.dev/go/material-button-migration-guide](https://flutter.dev/go/material-button-migration-guide). /// [flutter.dev/go/material-button-migration-guide](https://flutter.dev/go/material-button-migration-guide).
......
...@@ -55,8 +55,8 @@ enum ButtonBarLayoutBehavior { ...@@ -55,8 +55,8 @@ enum ButtonBarLayoutBehavior {
/// Please use one or more of the new buttons and their themes /// Please use one or more of the new buttons and their themes
/// instead: [TextButton] and [TextButtonTheme], [ElevatedButton] and /// instead: [TextButton] and [TextButtonTheme], [ElevatedButton] and
/// [ElevatedButtonTheme], [OutlinedButton] and /// [ElevatedButtonTheme], [OutlinedButton] and
/// [OutlinedButtonTheme]. The original classes will be deprecated /// [OutlinedButtonTheme]. The original classes have been deprecated,
/// soon, please migrate code that uses them. There's a detailed /// please migrate code that uses them. There's a detailed
/// migration guide for the new button and button theme classes in /// 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). /// [flutter.dev/go/material-button-migration-guide](https://flutter.dev/go/material-button-migration-guide).
/// ///
...@@ -179,7 +179,7 @@ class ButtonTheme extends InheritedTheme { ...@@ -179,7 +179,7 @@ class ButtonTheme extends InheritedTheme {
/// TextButton, ElevatedButton, and OutlinedButton respectively. /// TextButton, ElevatedButton, and OutlinedButton respectively.
/// ButtonTheme has been replaced by TextButtonTheme, /// ButtonTheme has been replaced by TextButtonTheme,
/// ElevatedButtonTheme, and OutlinedButtonTheme. The original classes /// 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 /// There's a detailed migration guide for the new button and button
/// theme classes in /// theme classes in
/// [flutter.dev/go/material-button-migration-guide](https://flutter.dev/go/material-button-migration-guide). /// [flutter.dev/go/material-button-migration-guide](https://flutter.dev/go/material-button-migration-guide).
......
...@@ -28,7 +28,7 @@ import 'theme_data.dart'; ...@@ -28,7 +28,7 @@ import 'theme_data.dart';
/// new widgets can be customized by specifying a [ButtonStyle] /// new widgets can be customized by specifying a [ButtonStyle]
/// or by creating a one-off style using a `styleFrom` method like /// or by creating a one-off style using a `styleFrom` method like
/// [TextButton.styleFrom]. The original button classes /// [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 /// There's a detailed migration guide for the new button and button
/// theme classes in /// theme classes in
/// [flutter.dev/go/material-button-migration-guide](https://flutter.dev/go/material-button-migration-guide). /// [flutter.dev/go/material-button-migration-guide](https://flutter.dev/go/material-button-migration-guide).
...@@ -177,8 +177,6 @@ class MaterialButton extends StatelessWidget { ...@@ -177,8 +177,6 @@ class MaterialButton extends StatelessWidget {
/// The button's fill color, displayed by its [Material], while it /// The button's fill color, displayed by its [Material], while it
/// is in its default (unpressed, [enabled]) state. /// is in its default (unpressed, [enabled]) state.
/// ///
/// The default fill color is the theme's button color, [ThemeData.buttonColor].
///
/// See also: /// See also:
/// ///
/// * [disabledColor] - the fill color of the button when the button is disabled. /// * [disabledColor] - the fill color of the button when the button is disabled.
......
...@@ -248,6 +248,10 @@ class ThemeData with Diagnosticable { ...@@ -248,6 +248,10 @@ class ThemeData with Diagnosticable {
Color? selectedRowColor, Color? selectedRowColor,
Color? unselectedWidgetColor, Color? unselectedWidgetColor,
Color? disabledColor, 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, Color? buttonColor,
ButtonThemeData? buttonTheme, ButtonThemeData? buttonTheme,
ToggleButtonsThemeData? toggleButtonsTheme, ToggleButtonsThemeData? toggleButtonsTheme,
...@@ -585,6 +589,10 @@ class ThemeData with Diagnosticable { ...@@ -585,6 +589,10 @@ class ThemeData with Diagnosticable {
required this.unselectedWidgetColor, required this.unselectedWidgetColor,
required this.disabledColor, required this.disabledColor,
required this.buttonTheme, 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.buttonColor,
required this.toggleButtonsTheme, required this.toggleButtonsTheme,
required this.secondaryHeaderColor, required this.secondaryHeaderColor,
...@@ -991,6 +999,10 @@ class ThemeData with Diagnosticable { ...@@ -991,6 +999,10 @@ class ThemeData with Diagnosticable {
final ToggleButtonsThemeData toggleButtonsTheme; final ToggleButtonsThemeData toggleButtonsTheme;
/// The default fill color of the [Material] used in [RaisedButton]s. /// 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; final Color buttonColor;
/// The color of the header of a [PaginatedDataTable] when there are selected rows. /// The color of the header of a [PaginatedDataTable] when there are selected rows.
...@@ -1336,6 +1348,10 @@ class ThemeData with Diagnosticable { ...@@ -1336,6 +1348,10 @@ class ThemeData with Diagnosticable {
Color? disabledColor, Color? disabledColor,
ButtonThemeData? buttonTheme, ButtonThemeData? buttonTheme,
ToggleButtonsThemeData? toggleButtonsTheme, 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? buttonColor,
Color? secondaryHeaderColor, Color? secondaryHeaderColor,
@Deprecated( @Deprecated(
......
...@@ -706,7 +706,6 @@ void main() { ...@@ -706,7 +706,6 @@ void main() {
disabledColor: Colors.black, disabledColor: Colors.black,
buttonTheme: const ButtonThemeData(colorScheme: ColorScheme.dark()), buttonTheme: const ButtonThemeData(colorScheme: ColorScheme.dark()),
toggleButtonsTheme: const ToggleButtonsThemeData(textStyle: TextStyle(color: Colors.black)), toggleButtonsTheme: const ToggleButtonsThemeData(textStyle: TextStyle(color: Colors.black)),
buttonColor: Colors.black,
secondaryHeaderColor: Colors.black, secondaryHeaderColor: Colors.black,
textSelectionColor: Colors.black, textSelectionColor: Colors.black,
cursorColor: Colors.black, cursorColor: Colors.black,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment