Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
1d8ab0f0
Unverified
Commit
1d8ab0f0
authored
May 10, 2021
by
Hans Muller
Committed by
GitHub
May 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deprecated ThemeData buttonColor (#82196)
parent
efd3cc5c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
8 deletions
+21
-8
button.dart
packages/flutter/lib/src/material/button.dart
+1
-1
button_theme.dart
packages/flutter/lib/src/material/button_theme.dart
+3
-3
material_button.dart
packages/flutter/lib/src/material/material_button.dart
+1
-3
theme_data.dart
packages/flutter/lib/src/material/theme_data.dart
+16
-0
snack_bar_test.dart
packages/flutter/test/material/snack_bar_test.dart
+0
-1
No files found.
packages/flutter/lib/src/material/button.dart
View file @
1d8ab0f0
...
...
@@ -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).
...
...
packages/flutter/lib/src/material/button_theme.dart
View file @
1d8ab0f0
...
...
@@ -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).
...
...
packages/flutter/lib/src/material/material_button.dart
View file @
1d8ab0f0
...
...
@@ -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.
...
...
packages/flutter/lib/src/material/theme_data.dart
View file @
1d8ab0f0
...
...
@@ -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
(
...
...
packages/flutter/test/material/snack_bar_test.dart
View file @
1d8ab0f0
...
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment