@@ -405,11 +405,6 @@ class ThemeData with Diagnosticable {
405
405
'This feature was deprecated after v2.3.0-0.1.pre.' ,
406
406
)
407
407
IconThemeData ? accentIconTheme,
408
- @Deprecated (
409
- 'No longer used by the framework, please remove any reference to it. '
410
- 'This feature was deprecated after v2.3.0-0.2.pre.' ,
411
- )
412
- Color ? buttonColor,
413
408
@Deprecated (
414
409
'This "fix" is now enabled by default. '
415
410
'This feature was deprecated after v2.5.0-1.0.pre.' ,
@@ -552,7 +547,7 @@ class ThemeData with Diagnosticable {
552
547
// [disabledColor], [highlightColor], and [splashColor].
553
548
buttonTheme ?? = ButtonThemeData (
554
549
colorScheme: colorScheme,
555
- buttonColor: buttonColor ?? ( isDark ? primarySwatch[600 ]! : Colors .grey[300 ]! ) ,
550
+ buttonColor: isDark ? primarySwatch[600 ]! : Colors .grey[300 ]! ,
556
551
disabledColor: disabledColor,
557
552
focusColor: focusColor,
558
553
hoverColor: hoverColor,
@@ -637,7 +632,6 @@ class ThemeData with Diagnosticable {
637
632
// DEPRECATED (newest deprecations at the bottom)
638
633
accentTextTheme = defaultAccentTextTheme.merge (accentTextTheme);
639
634
accentIconTheme ?? = accentIsDark ? const IconThemeData (color: Colors .white) : const IconThemeData (color: Colors .black);
640
- buttonColor ?? = isDark ? primarySwatch[600 ]! : Colors .grey[300 ]! ;
641
635
fixTextFieldOutlineLabel ?? = true ;
642
636
primaryColorBrightness = estimatedPrimaryColorBrightness;
643
637
errorColor ?? = Colors .red[700 ]! ;
@@ -736,7 +730,6 @@ class ThemeData with Diagnosticable {
736
730
accentColorBrightness: accentColorBrightness,
737
731
accentTextTheme: accentTextTheme,
738
732
accentIconTheme: accentIconTheme,
739
- buttonColor: buttonColor,
740
733
fixTextFieldOutlineLabel: fixTextFieldOutlineLabel,
741
734
primaryColorBrightness: primaryColorBrightness,
742
735
androidOverscrollIndicator: androidOverscrollIndicator,
@@ -874,11 +867,6 @@ class ThemeData with Diagnosticable {
874
867
'This feature was deprecated after v2.3.0-0.1.pre.' ,
875
868
)
876
869
IconThemeData ? accentIconTheme,
877
- @Deprecated (
878
- 'No longer used by the framework, please remove any reference to it. '
879
- 'This feature was deprecated after v2.3.0-0.2.pre.' ,
880
- )
881
- Color ? buttonColor,
882
870
@Deprecated (
883
871
'This "fix" is now enabled by default. '
884
872
'This feature was deprecated after v2.5.0-1.0.pre.' ,
@@ -928,7 +916,6 @@ class ThemeData with Diagnosticable {
928
916
_accentColorBrightness = accentColorBrightness,
929
917
_accentTextTheme = accentTextTheme,
930
918
_accentIconTheme = accentIconTheme,
931
- _buttonColor = buttonColor,
932
919
_fixTextFieldOutlineLabel = fixTextFieldOutlineLabel,
933
920
_primaryColorBrightness = primaryColorBrightness,
934
921
_toggleableActiveColor = toggleableActiveColor,
@@ -1022,7 +1009,6 @@ class ThemeData with Diagnosticable {
1022
1009
assert (accentColorBrightness != null ),
1023
1010
assert (accentTextTheme != null ),
1024
1011
assert (accentIconTheme != null ),
1025
- assert (buttonColor != null ),
1026
1012
assert (fixTextFieldOutlineLabel != null ),
1027
1013
assert (primaryColorBrightness != null ),
1028
1014
assert (errorColor != null ),
@@ -1405,14 +1391,13 @@ class ThemeData with Diagnosticable {
1405
1391
/// The color of [Material] when it is used as a [Card] .
1406
1392
final Color cardColor;
1407
1393
1408
- /// A set of twelve colors that can be used to configure the
1409
- /// color properties of most components.
1394
+ /// {@macro flutter.material.color_scheme.ColorScheme}
1410
1395
///
1411
- /// This property was added much later than the theme's set of highly
1412
- /// specific colors, like [cardColor] , [buttonColor] , [ canvasColor] etc.
1413
- /// New components can be defined exclusively in terms of [colorScheme] .
1414
- /// Existing components will gradually migrate to it, to the extent
1415
- /// that is possible without significant backwards compatibility breaks.
1396
+ /// This property was added much later than the theme's set of highly specific
1397
+ /// colors, like [cardColor] , [canvasColor] etc. New components can be defined
1398
+ /// exclusively in terms of [colorScheme] . Existing components will gradually
1399
+ /// migrate to it, to the extent that is possible without significant
1400
+ /// backwards compatibility breaks.
1416
1401
final ColorScheme colorScheme;
1417
1402
1418
1403
/// The background color of [Dialog] elements.
@@ -1752,14 +1737,6 @@ class ThemeData with Diagnosticable {
1752
1737
IconThemeData get accentIconTheme => _accentIconTheme! ;
1753
1738
final IconThemeData ? _accentIconTheme;
1754
1739
1755
- /// The default fill color of the [Material] .
1756
- @Deprecated (
1757
- 'No longer used by the framework, please remove any reference to it. '
1758
- 'This feature was deprecated after v2.3.0-0.2.pre.' ,
1759
- )
1760
- Color get buttonColor => _buttonColor! ;
1761
- final Color ? _buttonColor;
1762
-
1763
1740
/// An obsolete flag to allow apps to opt-out of a
1764
1741
/// [small fix] (https://github.com/flutter/flutter/issues/54028) for the Y
1765
1742
/// coordinate of the floating label in a [TextField] [OutlineInputBorder] .
@@ -1971,11 +1948,6 @@ class ThemeData with Diagnosticable {
1971
1948
'This feature was deprecated after v2.3.0-0.1.pre.' ,
1972
1949
)
1973
1950
IconThemeData ? accentIconTheme,
1974
- @Deprecated (
1975
- 'No longer used by the framework, please remove any reference to it. '
1976
- 'This feature was deprecated after v2.3.0-0.2.pre.' ,
1977
- )
1978
- Color ? buttonColor,
1979
1951
@Deprecated (
1980
1952
'This "fix" is now enabled by default. '
1981
1953
'This feature was deprecated after v2.5.0-1.0.pre.' ,
@@ -2112,7 +2084,6 @@ class ThemeData with Diagnosticable {
2112
2084
accentColorBrightness: accentColorBrightness ?? _accentColorBrightness,
2113
2085
accentTextTheme: accentTextTheme ?? _accentTextTheme,
2114
2086
accentIconTheme: accentIconTheme ?? _accentIconTheme,
2115
- buttonColor: buttonColor ?? _buttonColor,
2116
2087
fixTextFieldOutlineLabel: fixTextFieldOutlineLabel ?? _fixTextFieldOutlineLabel,
2117
2088
primaryColorBrightness: primaryColorBrightness ?? _primaryColorBrightness,
2118
2089
androidOverscrollIndicator: androidOverscrollIndicator ?? this .androidOverscrollIndicator,
@@ -2312,7 +2283,6 @@ class ThemeData with Diagnosticable {
2312
2283
accentColorBrightness: t < 0.5 ? a.accentColorBrightness : b.accentColorBrightness,
2313
2284
accentTextTheme: TextTheme .lerp (a.accentTextTheme, b.accentTextTheme, t),
2314
2285
accentIconTheme: IconThemeData .lerp (a.accentIconTheme, b.accentIconTheme, t),
2315
- buttonColor: Color .lerp (a.buttonColor, b.buttonColor, t),
2316
2286
fixTextFieldOutlineLabel: t < 0.5 ? a.fixTextFieldOutlineLabel : b.fixTextFieldOutlineLabel,
2317
2287
primaryColorBrightness: t < 0.5 ? a.primaryColorBrightness : b.primaryColorBrightness,
2318
2288
androidOverscrollIndicator: t < 0.5 ? a.androidOverscrollIndicator : b.androidOverscrollIndicator,
@@ -2421,7 +2391,6 @@ class ThemeData with Diagnosticable {
2421
2391
other.accentColorBrightness == accentColorBrightness &&
2422
2392
other.accentTextTheme == accentTextTheme &&
2423
2393
other.accentIconTheme == accentIconTheme &&
2424
- other.buttonColor == buttonColor &&
2425
2394
other.fixTextFieldOutlineLabel == fixTextFieldOutlineLabel &&
2426
2395
other.primaryColorBrightness == primaryColorBrightness &&
2427
2396
other.androidOverscrollIndicator == androidOverscrollIndicator &&
@@ -2527,7 +2496,6 @@ class ThemeData with Diagnosticable {
2527
2496
accentColorBrightness,
2528
2497
accentTextTheme,
2529
2498
accentIconTheme,
2530
- buttonColor,
2531
2499
fixTextFieldOutlineLabel,
2532
2500
primaryColorBrightness,
2533
2501
androidOverscrollIndicator,
@@ -2635,7 +2603,6 @@ class ThemeData with Diagnosticable {
2635
2603
properties.add (EnumProperty <Brightness >('accentColorBrightness' , accentColorBrightness, defaultValue: defaultData.accentColorBrightness, level: DiagnosticLevel .debug));
2636
2604
properties.add (DiagnosticsProperty <TextTheme >('accentTextTheme' , accentTextTheme, level: DiagnosticLevel .debug));
2637
2605
properties.add (DiagnosticsProperty <IconThemeData >('accentIconTheme' , accentIconTheme, level: DiagnosticLevel .debug));
2638
- properties.add (ColorProperty ('buttonColor' , buttonColor, defaultValue: defaultData.buttonColor, level: DiagnosticLevel .debug));
2639
2606
properties.add (DiagnosticsProperty <bool >('fixTextFieldOutlineLabel' , fixTextFieldOutlineLabel, level: DiagnosticLevel .debug));
2640
2607
properties.add (EnumProperty <Brightness >('primaryColorBrightness' , primaryColorBrightness, defaultValue: defaultData.primaryColorBrightness, level: DiagnosticLevel .debug));
2641
2608
properties.add (EnumProperty <AndroidOverscrollIndicator >('androidOverscrollIndicator' , androidOverscrollIndicator, defaultValue: null , level: DiagnosticLevel .debug));
0 commit comments