@@ -286,7 +286,6 @@ class ThemeData with Diagnosticable {
286
286
Color ? highlightColor,
287
287
Color ? hintColor,
288
288
Color ? hoverColor,
289
- Color ? indicatorColor,
290
289
Color ? primaryColor,
291
290
Color ? primaryColorDark,
292
291
Color ? primaryColorLight,
@@ -365,6 +364,11 @@ class ThemeData with Diagnosticable {
365
364
'This feature was deprecated after v3.27.0-0.1.pre.' ,
366
365
)
367
366
Color ? dialogBackgroundColor,
367
+ @Deprecated (
368
+ 'Use TabBarThemeData.indicatorColor instead. '
369
+ 'This feature was deprecated after v3.28.0-1.0.pre.' ,
370
+ )
371
+ Color ? indicatorColor,
368
372
}) {
369
373
// GENERAL CONFIGURATION
370
374
cupertinoOverrideTheme = cupertinoOverrideTheme? .noDefault ();
@@ -459,7 +463,6 @@ class ThemeData with Diagnosticable {
459
463
unselectedWidgetColor ?? = isDark ? Colors .white70 : Colors .black54;
460
464
// Spec doesn't specify a dark theme secondaryHeaderColor, this is a guess.
461
465
secondaryHeaderColor ?? = isDark ? Colors .grey[700 ]! : primarySwatch[50 ]! ;
462
- indicatorColor ?? = colorScheme.secondary == primaryColor ? Colors .white : colorScheme.secondary;
463
466
hintColor ?? = isDark ? Colors .white60 : Colors .black.withOpacity (0.6 );
464
467
// The default [buttonTheme] is here because it doesn't use the defaults for
465
468
// [disabledColor], [highlightColor], and [splashColor].
@@ -580,6 +583,7 @@ class ThemeData with Diagnosticable {
580
583
// DEPRECATED (newest deprecations at the bottom)
581
584
buttonBarTheme ?? = const ButtonBarThemeData ();
582
585
dialogBackgroundColor ?? = isDark ? Colors .grey[800 ]! : Colors .white;
586
+ indicatorColor ?? = colorScheme.secondary == primaryColor ? Colors .white : colorScheme.secondary;
583
587
return ThemeData .raw (
584
588
// For the sanity of the reader, make sure these properties are in the same
585
589
// order in every place that they are separated by section comments (e.g.
@@ -609,7 +613,6 @@ class ThemeData with Diagnosticable {
609
613
highlightColor: highlightColor,
610
614
hintColor: hintColor,
611
615
hoverColor: hoverColor,
612
- indicatorColor: indicatorColor,
613
616
primaryColor: primaryColor,
614
617
primaryColorDark: primaryColorDark,
615
618
primaryColorLight: primaryColorLight,
@@ -673,6 +676,7 @@ class ThemeData with Diagnosticable {
673
676
// DEPRECATED (newest deprecations at the bottom)
674
677
buttonBarTheme: buttonBarTheme,
675
678
dialogBackgroundColor: dialogBackgroundColor,
679
+ indicatorColor: indicatorColor,
676
680
);
677
681
}
678
682
@@ -715,7 +719,6 @@ class ThemeData with Diagnosticable {
715
719
required this .highlightColor,
716
720
required this .hintColor,
717
721
required this .hoverColor,
718
- required this .indicatorColor,
719
722
required this .primaryColor,
720
723
required this .primaryColorDark,
721
724
required this .primaryColorLight,
@@ -787,6 +790,11 @@ class ThemeData with Diagnosticable {
787
790
'This feature was deprecated after v3.27.0-0.1.pre.' ,
788
791
)
789
792
required this .dialogBackgroundColor,
793
+ @Deprecated (
794
+ 'Use TabBarThemeData.indicatorColor instead. '
795
+ 'This feature was deprecated after v3.28.0-1.0.pre.' ,
796
+ )
797
+ required this .indicatorColor,
790
798
}) : // DEPRECATED (newest deprecations at the bottom)
791
799
// should not be `required`, use getter pattern to avoid breakages.
792
800
_buttonBarTheme = buttonBarTheme,
@@ -1204,9 +1212,6 @@ class ThemeData with Diagnosticable {
1204
1212
/// component.
1205
1213
final Color hoverColor;
1206
1214
1207
- /// The color of the selected tab indicator in a tab bar.
1208
- final Color indicatorColor;
1209
-
1210
1215
/// The background color for major parts of the app (toolbars, tab bars, etc)
1211
1216
///
1212
1217
/// The theme's [colorScheme] property contains [ColorScheme.primary] , as
@@ -1451,6 +1456,13 @@ class ThemeData with Diagnosticable {
1451
1456
)
1452
1457
final Color dialogBackgroundColor;
1453
1458
1459
+ /// The color of the selected tab indicator in a tab bar.
1460
+ @Deprecated (
1461
+ 'Use TabBarThemeData.indicatorColor instead. '
1462
+ 'This feature was deprecated after v3.28.0-1.0.pre.' ,
1463
+ )
1464
+ final Color indicatorColor;
1465
+
1454
1466
/// Creates a copy of this theme but with the given fields replaced with the new values.
1455
1467
///
1456
1468
/// The [brightness] value is applied to the [colorScheme] .
@@ -1486,7 +1498,6 @@ class ThemeData with Diagnosticable {
1486
1498
Color ? highlightColor,
1487
1499
Color ? hintColor,
1488
1500
Color ? hoverColor,
1489
- Color ? indicatorColor,
1490
1501
Color ? primaryColor,
1491
1502
Color ? primaryColorDark,
1492
1503
Color ? primaryColorLight,
@@ -1568,6 +1579,11 @@ class ThemeData with Diagnosticable {
1568
1579
'This feature was deprecated after v3.27.0-0.1.pre.' ,
1569
1580
)
1570
1581
Color ? dialogBackgroundColor,
1582
+ @Deprecated (
1583
+ 'Use TabBarThemeData.indicatorColor instead. '
1584
+ 'This feature was deprecated after v3.28.0-1.0.pre.' ,
1585
+ )
1586
+ Color ? indicatorColor,
1571
1587
}) {
1572
1588
cupertinoOverrideTheme = cupertinoOverrideTheme? .noDefault ();
1573
1589
@@ -1628,7 +1644,6 @@ class ThemeData with Diagnosticable {
1628
1644
highlightColor: highlightColor ?? this .highlightColor,
1629
1645
hintColor: hintColor ?? this .hintColor,
1630
1646
hoverColor: hoverColor ?? this .hoverColor,
1631
- indicatorColor: indicatorColor ?? this .indicatorColor,
1632
1647
primaryColor: primaryColor ?? this .primaryColor,
1633
1648
primaryColorDark: primaryColorDark ?? this .primaryColorDark,
1634
1649
primaryColorLight: primaryColorLight ?? this .primaryColorLight,
@@ -1692,6 +1707,7 @@ class ThemeData with Diagnosticable {
1692
1707
// DEPRECATED (newest deprecations at the bottom)
1693
1708
buttonBarTheme: buttonBarTheme ?? _buttonBarTheme,
1694
1709
dialogBackgroundColor: dialogBackgroundColor ?? this .dialogBackgroundColor,
1710
+ indicatorColor: indicatorColor ?? this .indicatorColor,
1695
1711
);
1696
1712
}
1697
1713
@@ -1835,7 +1851,6 @@ class ThemeData with Diagnosticable {
1835
1851
highlightColor: Color .lerp (a.highlightColor, b.highlightColor, t)! ,
1836
1852
hintColor: Color .lerp (a.hintColor, b.hintColor, t)! ,
1837
1853
hoverColor: Color .lerp (a.hoverColor, b.hoverColor, t)! ,
1838
- indicatorColor: Color .lerp (a.indicatorColor, b.indicatorColor, t)! ,
1839
1854
primaryColor: Color .lerp (a.primaryColor, b.primaryColor, t)! ,
1840
1855
primaryColorDark: Color .lerp (a.primaryColorDark, b.primaryColorDark, t)! ,
1841
1856
primaryColorLight: Color .lerp (a.primaryColorLight, b.primaryColorLight, t)! ,
@@ -1921,6 +1936,7 @@ class ThemeData with Diagnosticable {
1921
1936
// DEPRECATED (newest deprecations at the bottom)
1922
1937
buttonBarTheme: ButtonBarThemeData .lerp (a.buttonBarTheme, b.buttonBarTheme, t),
1923
1938
dialogBackgroundColor: Color .lerp (a.dialogBackgroundColor, b.dialogBackgroundColor, t)! ,
1939
+ indicatorColor: Color .lerp (a.indicatorColor, b.indicatorColor, t)! ,
1924
1940
);
1925
1941
}
1926
1942
@@ -1957,7 +1973,6 @@ class ThemeData with Diagnosticable {
1957
1973
other.highlightColor == highlightColor &&
1958
1974
other.hintColor == hintColor &&
1959
1975
other.hoverColor == hoverColor &&
1960
- other.indicatorColor == indicatorColor &&
1961
1976
other.primaryColor == primaryColor &&
1962
1977
other.primaryColorDark == primaryColorDark &&
1963
1978
other.primaryColorLight == primaryColorLight &&
@@ -2020,7 +2035,8 @@ class ThemeData with Diagnosticable {
2020
2035
other.tooltipTheme == tooltipTheme &&
2021
2036
// DEPRECATED (newest deprecations at the bottom)
2022
2037
other.buttonBarTheme == buttonBarTheme &&
2023
- other.dialogBackgroundColor == dialogBackgroundColor;
2038
+ other.dialogBackgroundColor == dialogBackgroundColor &&
2039
+ other.indicatorColor == indicatorColor;
2024
2040
}
2025
2041
2026
2042
@override
@@ -2056,7 +2072,6 @@ class ThemeData with Diagnosticable {
2056
2072
highlightColor,
2057
2073
hintColor,
2058
2074
hoverColor,
2059
- indicatorColor,
2060
2075
primaryColor,
2061
2076
primaryColorDark,
2062
2077
primaryColorLight,
@@ -2120,6 +2135,7 @@ class ThemeData with Diagnosticable {
2120
2135
// DEPRECATED (newest deprecations at the bottom)
2121
2136
buttonBarTheme,
2122
2137
dialogBackgroundColor,
2138
+ indicatorColor,
2123
2139
];
2124
2140
return Object .hashAll (values);
2125
2141
}
@@ -2299,14 +2315,6 @@ class ThemeData with Diagnosticable {
2299
2315
level: DiagnosticLevel .debug,
2300
2316
),
2301
2317
);
2302
- properties.add (
2303
- ColorProperty (
2304
- 'indicatorColor' ,
2305
- indicatorColor,
2306
- defaultValue: defaultData.indicatorColor,
2307
- level: DiagnosticLevel .debug,
2308
- ),
2309
- );
2310
2318
properties.add (
2311
2319
ColorProperty (
2312
2320
'primaryColorDark' ,
@@ -2761,6 +2769,14 @@ class ThemeData with Diagnosticable {
2761
2769
level: DiagnosticLevel .debug,
2762
2770
),
2763
2771
);
2772
+ properties.add (
2773
+ ColorProperty (
2774
+ 'indicatorColor' ,
2775
+ indicatorColor,
2776
+ defaultValue: defaultData.indicatorColor,
2777
+ level: DiagnosticLevel .debug,
2778
+ ),
2779
+ );
2764
2780
}
2765
2781
}
2766
2782
0 commit comments