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';
/// 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).
......
......@@ -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).
......
......@@ -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.
......
......@@ -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(
......
......@@ -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,
......
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