@@ -395,20 +395,6 @@ class ThemeData with Diagnosticable {
395
395
'This feature was deprecated after v2.3.0-0.1.pre.' ,
396
396
)
397
397
Brightness ? accentColorBrightness,
398
- @Deprecated (
399
- 'No longer used by the framework, please remove any reference to it. '
400
- 'For more information, consult the migration guide at '
401
- 'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. '
402
- 'This feature was deprecated after v2.3.0-0.1.pre.' ,
403
- )
404
- TextTheme ? accentTextTheme,
405
- @Deprecated (
406
- 'No longer used by the framework, please remove any reference to it. '
407
- 'For more information, consult the migration guide at '
408
- 'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. '
409
- 'This feature was deprecated after v2.3.0-0.1.pre.' ,
410
- )
411
- IconThemeData ? accentIconTheme,
412
398
@Deprecated (
413
399
'This "fix" is now enabled by default. '
414
400
'This feature was deprecated after v2.5.0-1.0.pre.' ,
@@ -521,7 +507,6 @@ class ThemeData with Diagnosticable {
521
507
toggleableActiveColor ?? = isDark ? Colors .tealAccent[200 ]! : (accentColor ?? primarySwatch[600 ]! );
522
508
accentColor ?? = isDark ? Colors .tealAccent[200 ]! : primarySwatch[500 ]! ;
523
509
accentColorBrightness ?? = estimateBrightnessForColor (accentColor);
524
- final bool accentIsDark = accentColorBrightness == Brightness .dark;
525
510
focusColor ?? = isDark ? Colors .white.withOpacity (0.12 ) : Colors .black.withOpacity (0.12 );
526
511
hoverColor ?? = isDark ? Colors .white.withOpacity (0.04 ) : Colors .black.withOpacity (0.04 );
527
512
shadowColor ?? = Colors .black;
@@ -569,21 +554,17 @@ class ThemeData with Diagnosticable {
569
554
: Typography .material2014 (platform: platform);
570
555
TextTheme defaultTextTheme = isDark ? typography.white : typography.black;
571
556
TextTheme defaultPrimaryTextTheme = primaryIsDark ? typography.white : typography.black;
572
- TextTheme defaultAccentTextTheme = accentIsDark ? typography.white : typography.black;
573
557
if (fontFamily != null ) {
574
558
defaultTextTheme = defaultTextTheme.apply (fontFamily: fontFamily);
575
559
defaultPrimaryTextTheme = defaultPrimaryTextTheme.apply (fontFamily: fontFamily);
576
- defaultAccentTextTheme = defaultAccentTextTheme.apply (fontFamily: fontFamily);
577
560
}
578
561
if (fontFamilyFallback != null ) {
579
562
defaultTextTheme = defaultTextTheme.apply (fontFamilyFallback: fontFamilyFallback);
580
563
defaultPrimaryTextTheme = defaultPrimaryTextTheme.apply (fontFamilyFallback: fontFamilyFallback);
581
- defaultAccentTextTheme = defaultAccentTextTheme.apply (fontFamilyFallback: fontFamilyFallback);
582
564
}
583
565
if (package != null ) {
584
566
defaultTextTheme = defaultTextTheme.apply (package: package);
585
567
defaultPrimaryTextTheme = defaultPrimaryTextTheme.apply (package: package);
586
- defaultAccentTextTheme = defaultAccentTextTheme.apply (package: package);
587
568
}
588
569
textTheme = defaultTextTheme.merge (textTheme);
589
570
primaryTextTheme = defaultPrimaryTextTheme.merge (primaryTextTheme);
@@ -635,8 +616,6 @@ class ThemeData with Diagnosticable {
635
616
tooltipTheme ?? = const TooltipThemeData ();
636
617
637
618
// DEPRECATED (newest deprecations at the bottom)
638
- accentTextTheme = defaultAccentTextTheme.merge (accentTextTheme);
639
- accentIconTheme ?? = accentIsDark ? const IconThemeData (color: Colors .white) : const IconThemeData (color: Colors .black);
640
619
fixTextFieldOutlineLabel ?? = true ;
641
620
primaryColorBrightness = estimatedPrimaryColorBrightness;
642
621
errorColor ?? = Colors .red[700 ]! ;
@@ -734,8 +713,6 @@ class ThemeData with Diagnosticable {
734
713
// DEPRECATED (newest deprecations at the bottom)
735
714
accentColor: accentColor,
736
715
accentColorBrightness: accentColorBrightness,
737
- accentTextTheme: accentTextTheme,
738
- accentIconTheme: accentIconTheme,
739
716
fixTextFieldOutlineLabel: fixTextFieldOutlineLabel,
740
717
primaryColorBrightness: primaryColorBrightness,
741
718
androidOverscrollIndicator: androidOverscrollIndicator,
@@ -860,20 +837,6 @@ class ThemeData with Diagnosticable {
860
837
'This feature was deprecated after v2.3.0-0.1.pre.' ,
861
838
)
862
839
Brightness ? accentColorBrightness,
863
- @Deprecated (
864
- 'No longer used by the framework, please remove any reference to it. '
865
- 'For more information, consult the migration guide at '
866
- 'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. '
867
- 'This feature was deprecated after v2.3.0-0.1.pre.' ,
868
- )
869
- TextTheme ? accentTextTheme,
870
- @Deprecated (
871
- 'No longer used by the framework, please remove any reference to it. '
872
- 'For more information, consult the migration guide at '
873
- 'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. '
874
- 'This feature was deprecated after v2.3.0-0.1.pre.' ,
875
- )
876
- IconThemeData ? accentIconTheme,
877
840
@Deprecated (
878
841
'This "fix" is now enabled by default. '
879
842
'This feature was deprecated after v2.5.0-1.0.pre.' ,
@@ -921,8 +884,6 @@ class ThemeData with Diagnosticable {
921
884
// should not be `required`, use getter pattern to avoid breakages.
922
885
_accentColor = accentColor,
923
886
_accentColorBrightness = accentColorBrightness,
924
- _accentTextTheme = accentTextTheme,
925
- _accentIconTheme = accentIconTheme,
926
887
_fixTextFieldOutlineLabel = fixTextFieldOutlineLabel,
927
888
_primaryColorBrightness = primaryColorBrightness,
928
889
_toggleableActiveColor = toggleableActiveColor,
@@ -934,8 +895,6 @@ class ThemeData with Diagnosticable {
934
895
// DEPRECATED (newest deprecations at the bottom)
935
896
assert (accentColor != null ),
936
897
assert (accentColorBrightness != null ),
937
- assert (accentTextTheme != null ),
938
- assert (accentIconTheme != null ),
939
898
assert (fixTextFieldOutlineLabel != null ),
940
899
assert (primaryColorBrightness != null ),
941
900
assert (errorColor != null ),
@@ -1630,46 +1589,6 @@ class ThemeData with Diagnosticable {
1630
1589
Brightness get accentColorBrightness => _accentColorBrightness! ;
1631
1590
final Brightness ? _accentColorBrightness;
1632
1591
1633
- /// Obsolete property that was originally used when a [TextTheme]
1634
- /// that contrasted well with the [accentColor] was needed.
1635
- ///
1636
- /// The material library no longer uses this property and most uses
1637
- /// of [accentColor] have been replaced with
1638
- /// the theme's [colorScheme] [ColorScheme.secondary] .
1639
- /// You can configure the color of a [textTheme] [TextStyle] so that it
1640
- /// contrasts well with the [ColorScheme.secondary] like this:
1641
- ///
1642
- /// ```dart
1643
- /// final ThemeData theme = Theme.of(context);
1644
- /// final TextStyle style = theme.textTheme.displayLarge!.copyWith(
1645
- /// color: theme.colorScheme.onSecondary,
1646
- /// );
1647
- /// // ...use style...
1648
- /// ```
1649
- @Deprecated (
1650
- 'No longer used by the framework, please remove any reference to it. '
1651
- 'For more information, consult the migration guide at '
1652
- 'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. '
1653
- 'This feature was deprecated after v2.3.0-0.1.pre.' ,
1654
- )
1655
- TextTheme get accentTextTheme => _accentTextTheme! ;
1656
- final TextTheme ? _accentTextTheme;
1657
-
1658
- /// Obsolete property that was originally used when an [IconTheme]
1659
- /// that contrasted well with the [accentColor] was needed.
1660
- ///
1661
- /// The material library no longer uses this property and most uses
1662
- /// of [accentColor] have been replaced with
1663
- /// the theme's [colorScheme] [ColorScheme.secondary] .
1664
- @Deprecated (
1665
- 'No longer used by the framework, please remove any reference to it. '
1666
- 'For more information, consult the migration guide at '
1667
- 'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. '
1668
- 'This feature was deprecated after v2.3.0-0.1.pre.' ,
1669
- )
1670
- IconThemeData get accentIconTheme => _accentIconTheme! ;
1671
- final IconThemeData ? _accentIconTheme;
1672
-
1673
1592
/// An obsolete flag to allow apps to opt-out of a
1674
1593
/// [small fix] (https://github.com/flutter/flutter/issues/54028) for the Y
1675
1594
/// coordinate of the floating label in a [TextField] [OutlineInputBorder] .
@@ -1868,20 +1787,6 @@ class ThemeData with Diagnosticable {
1868
1787
'This feature was deprecated after v2.3.0-0.1.pre.' ,
1869
1788
)
1870
1789
Brightness ? accentColorBrightness,
1871
- @Deprecated (
1872
- 'No longer used by the framework, please remove any reference to it. '
1873
- 'For more information, consult the migration guide at '
1874
- 'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. '
1875
- 'This feature was deprecated after v2.3.0-0.1.pre.' ,
1876
- )
1877
- TextTheme ? accentTextTheme,
1878
- @Deprecated (
1879
- 'No longer used by the framework, please remove any reference to it. '
1880
- 'For more information, consult the migration guide at '
1881
- 'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. '
1882
- 'This feature was deprecated after v2.3.0-0.1.pre.' ,
1883
- )
1884
- IconThemeData ? accentIconTheme,
1885
1790
@Deprecated (
1886
1791
'This "fix" is now enabled by default. '
1887
1792
'This feature was deprecated after v2.5.0-1.0.pre.' ,
@@ -2017,8 +1922,6 @@ class ThemeData with Diagnosticable {
2017
1922
// DEPRECATED (newest deprecations at the bottom)
2018
1923
accentColor: accentColor ?? _accentColor,
2019
1924
accentColorBrightness: accentColorBrightness ?? _accentColorBrightness,
2020
- accentTextTheme: accentTextTheme ?? _accentTextTheme,
2021
- accentIconTheme: accentIconTheme ?? _accentIconTheme,
2022
1925
fixTextFieldOutlineLabel: fixTextFieldOutlineLabel ?? _fixTextFieldOutlineLabel,
2023
1926
primaryColorBrightness: primaryColorBrightness ?? _primaryColorBrightness,
2024
1927
androidOverscrollIndicator: androidOverscrollIndicator ?? this .androidOverscrollIndicator,
@@ -2059,7 +1962,6 @@ class ThemeData with Diagnosticable {
2059
1962
() {
2060
1963
return baseTheme.copyWith (
2061
1964
primaryTextTheme: localTextGeometry.merge (baseTheme.primaryTextTheme),
2062
- accentTextTheme: localTextGeometry.merge (baseTheme.accentTextTheme),
2063
1965
textTheme: localTextGeometry.merge (baseTheme.textTheme),
2064
1966
);
2065
1967
},
@@ -2212,8 +2114,6 @@ class ThemeData with Diagnosticable {
2212
2114
// DEPRECATED (newest deprecations at the bottom)
2213
2115
accentColor: Color .lerp (a.accentColor, b.accentColor, t),
2214
2116
accentColorBrightness: t < 0.5 ? a.accentColorBrightness : b.accentColorBrightness,
2215
- accentTextTheme: TextTheme .lerp (a.accentTextTheme, b.accentTextTheme, t),
2216
- accentIconTheme: IconThemeData .lerp (a.accentIconTheme, b.accentIconTheme, t),
2217
2117
fixTextFieldOutlineLabel: t < 0.5 ? a.fixTextFieldOutlineLabel : b.fixTextFieldOutlineLabel,
2218
2118
primaryColorBrightness: t < 0.5 ? a.primaryColorBrightness : b.primaryColorBrightness,
2219
2119
androidOverscrollIndicator: t < 0.5 ? a.androidOverscrollIndicator : b.androidOverscrollIndicator,
@@ -2321,8 +2221,6 @@ class ThemeData with Diagnosticable {
2321
2221
// DEPRECATED (newest deprecations at the bottom)
2322
2222
other.accentColor == accentColor &&
2323
2223
other.accentColorBrightness == accentColorBrightness &&
2324
- other.accentTextTheme == accentTextTheme &&
2325
- other.accentIconTheme == accentIconTheme &&
2326
2224
other.fixTextFieldOutlineLabel == fixTextFieldOutlineLabel &&
2327
2225
other.primaryColorBrightness == primaryColorBrightness &&
2328
2226
other.androidOverscrollIndicator == androidOverscrollIndicator &&
@@ -2427,8 +2325,6 @@ class ThemeData with Diagnosticable {
2427
2325
// DEPRECATED (newest deprecations at the bottom)
2428
2326
accentColor,
2429
2327
accentColorBrightness,
2430
- accentTextTheme,
2431
- accentIconTheme,
2432
2328
fixTextFieldOutlineLabel,
2433
2329
primaryColorBrightness,
2434
2330
androidOverscrollIndicator,
@@ -2535,8 +2431,6 @@ class ThemeData with Diagnosticable {
2535
2431
// DEPRECATED (newest deprecations at the bottom)
2536
2432
properties.add (ColorProperty ('accentColor' , accentColor, defaultValue: defaultData.accentColor, level: DiagnosticLevel .debug));
2537
2433
properties.add (EnumProperty <Brightness >('accentColorBrightness' , accentColorBrightness, defaultValue: defaultData.accentColorBrightness, level: DiagnosticLevel .debug));
2538
- properties.add (DiagnosticsProperty <TextTheme >('accentTextTheme' , accentTextTheme, level: DiagnosticLevel .debug));
2539
- properties.add (DiagnosticsProperty <IconThemeData >('accentIconTheme' , accentIconTheme, level: DiagnosticLevel .debug));
2540
2434
properties.add (DiagnosticsProperty <bool >('fixTextFieldOutlineLabel' , fixTextFieldOutlineLabel, level: DiagnosticLevel .debug));
2541
2435
properties.add (EnumProperty <Brightness >('primaryColorBrightness' , primaryColorBrightness, defaultValue: defaultData.primaryColorBrightness, level: DiagnosticLevel .debug));
2542
2436
properties.add (EnumProperty <AndroidOverscrollIndicator >('androidOverscrollIndicator' , androidOverscrollIndicator, defaultValue: null , level: DiagnosticLevel .debug));
0 commit comments