Skip to content

Commit 5be1918

Browse files
Remove deprecated ThemeData.selectedRowColor (#139080)
Part of: flutter/flutter#139243
1 parent 0c280d4 commit 5be1918

2 files changed

Lines changed: 0 additions & 36 deletions

File tree

packages/flutter/lib/src/material/theme_data.dart

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -374,11 +374,6 @@ class ThemeData with Diagnosticable {
374374
'This feature was deprecated after v3.4.0-19.0.pre.',
375375
)
376376
Color? toggleableActiveColor,
377-
@Deprecated(
378-
'No longer used by the framework, please remove any reference to it. '
379-
'This feature was deprecated after v3.1.0-0.0.pre.',
380-
)
381-
Color? selectedRowColor,
382377
@Deprecated(
383378
'Use colorScheme.error instead. '
384379
'This feature was deprecated after v3.3.0-0.5.pre.',
@@ -480,7 +475,6 @@ class ThemeData with Diagnosticable {
480475
errorColor: Colors.red[700],
481476
brightness: effectiveBrightness,
482477
);
483-
selectedRowColor ??= Colors.grey[100]!;
484478
unselectedWidgetColor ??= isDark ? Colors.white70 : Colors.black54;
485479
// Spec doesn't specify a dark theme secondaryHeaderColor, this is a guess.
486480
secondaryHeaderColor ??= isDark ? Colors.grey[700]! : primarySwatch[50]!;
@@ -671,7 +665,6 @@ class ThemeData with Diagnosticable {
671665
tooltipTheme: tooltipTheme,
672666
// DEPRECATED (newest deprecations at the bottom)
673667
toggleableActiveColor: toggleableActiveColor,
674-
selectedRowColor: selectedRowColor,
675668
errorColor: errorColor,
676669
backgroundColor: backgroundColor,
677670
bottomAppBarColor: bottomAppBarColor,
@@ -788,11 +781,6 @@ class ThemeData with Diagnosticable {
788781
'This feature was deprecated after v3.4.0-19.0.pre.',
789782
)
790783
Color? toggleableActiveColor,
791-
@Deprecated(
792-
'No longer used by the framework, please remove any reference to it. '
793-
'This feature was deprecated after v3.1.0-0.0.pre.',
794-
)
795-
Color? selectedRowColor,
796784
@Deprecated(
797785
'Use colorScheme.error instead. '
798786
'This feature was deprecated after v3.3.0-0.5.pre.',
@@ -812,7 +800,6 @@ class ThemeData with Diagnosticable {
812800
}) : // DEPRECATED (newest deprecations at the bottom)
813801
// should not be `required`, use getter pattern to avoid breakages.
814802
_toggleableActiveColor = toggleableActiveColor,
815-
_selectedRowColor = selectedRowColor,
816803
_errorColor = errorColor,
817804
_backgroundColor = backgroundColor,
818805
_bottomAppBarColor = bottomAppBarColor,
@@ -1277,14 +1264,6 @@ class ThemeData with Diagnosticable {
12771264
// ...this should be the "50-value of secondary app color".
12781265
final Color secondaryHeaderColor;
12791266

1280-
/// The color used to highlight selected rows.
1281-
@Deprecated(
1282-
'No longer used by the framework, please remove any reference to it. '
1283-
'This feature was deprecated after v3.1.0-0.0.pre.',
1284-
)
1285-
Color get selectedRowColor => _selectedRowColor!;
1286-
final Color? _selectedRowColor;
1287-
12881267
/// The color that the [Material] widget uses to draw elevation shadows.
12891268
///
12901269
/// Defaults to fully opaque black.
@@ -1630,11 +1609,6 @@ class ThemeData with Diagnosticable {
16301609
'This feature was deprecated after v3.4.0-19.0.pre.',
16311610
)
16321611
Color? toggleableActiveColor,
1633-
@Deprecated(
1634-
'No longer used by the framework, please remove any reference to it. '
1635-
'This feature was deprecated after v3.1.0-0.0.pre.',
1636-
)
1637-
Color? selectedRowColor,
16381612
@Deprecated(
16391613
'Use colorScheme.error instead. '
16401614
'This feature was deprecated after v3.3.0-0.5.pre.',
@@ -1756,7 +1730,6 @@ class ThemeData with Diagnosticable {
17561730
tooltipTheme: tooltipTheme ?? this.tooltipTheme,
17571731
// DEPRECATED (newest deprecations at the bottom)
17581732
toggleableActiveColor: toggleableActiveColor ?? _toggleableActiveColor,
1759-
selectedRowColor: selectedRowColor ?? _selectedRowColor,
17601733
errorColor: errorColor ?? _errorColor,
17611734
backgroundColor: backgroundColor ?? _backgroundColor,
17621735
bottomAppBarColor: bottomAppBarColor ?? _bottomAppBarColor,
@@ -1955,7 +1928,6 @@ class ThemeData with Diagnosticable {
19551928
tooltipTheme: TooltipThemeData.lerp(a.tooltipTheme, b.tooltipTheme, t)!,
19561929
// DEPRECATED (newest deprecations at the bottom)
19571930
toggleableActiveColor: Color.lerp(a.toggleableActiveColor, b.toggleableActiveColor, t),
1958-
selectedRowColor: Color.lerp(a.selectedRowColor, b.selectedRowColor, t),
19591931
errorColor: Color.lerp(a.errorColor, b.errorColor, t),
19601932
backgroundColor: Color.lerp(a.backgroundColor, b.backgroundColor, t),
19611933
bottomAppBarColor: Color.lerp(a.bottomAppBarColor, b.bottomAppBarColor, t),
@@ -2061,7 +2033,6 @@ class ThemeData with Diagnosticable {
20612033
other.tooltipTheme == tooltipTheme &&
20622034
// DEPRECATED (newest deprecations at the bottom)
20632035
other.toggleableActiveColor == toggleableActiveColor &&
2064-
other.selectedRowColor == selectedRowColor &&
20652036
other.errorColor == errorColor &&
20662037
other.backgroundColor == backgroundColor &&
20672038
other.bottomAppBarColor == bottomAppBarColor;
@@ -2165,7 +2136,6 @@ class ThemeData with Diagnosticable {
21652136
tooltipTheme,
21662137
// DEPRECATED (newest deprecations at the bottom)
21672138
toggleableActiveColor,
2168-
selectedRowColor,
21692139
errorColor,
21702140
backgroundColor,
21712141
bottomAppBarColor,
@@ -2270,7 +2240,6 @@ class ThemeData with Diagnosticable {
22702240
properties.add(DiagnosticsProperty<TooltipThemeData>('tooltipTheme', tooltipTheme, level: DiagnosticLevel.debug));
22712241
// DEPRECATED (newest deprecations at the bottom)
22722242
properties.add(ColorProperty('toggleableActiveColor', toggleableActiveColor, defaultValue: defaultData.toggleableActiveColor, level: DiagnosticLevel.debug));
2273-
properties.add(ColorProperty('selectedRowColor', selectedRowColor, defaultValue: defaultData.selectedRowColor, level: DiagnosticLevel.debug));
22742243
properties.add(ColorProperty('errorColor', errorColor, defaultValue: defaultData.errorColor, level: DiagnosticLevel.debug));
22752244
properties.add(ColorProperty('backgroundColor', backgroundColor, defaultValue: defaultData.backgroundColor, level: DiagnosticLevel.debug));
22762245
properties.add(ColorProperty('bottomAppBarColor', bottomAppBarColor, defaultValue: defaultData.bottomAppBarColor, level: DiagnosticLevel.debug));

packages/flutter/test/material/theme_data_test.dart

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,6 @@ void main() {
811811
tooltipTheme: const TooltipThemeData(height: 100),
812812
// DEPRECATED (newest deprecations at the bottom)
813813
toggleableActiveColor: Colors.black,
814-
selectedRowColor: Colors.black,
815814
errorColor: Colors.black,
816815
backgroundColor: Colors.black,
817816
bottomAppBarColor: Colors.black,
@@ -932,7 +931,6 @@ void main() {
932931

933932
// DEPRECATED (newest deprecations at the bottom)
934933
toggleableActiveColor: Colors.white,
935-
selectedRowColor: Colors.white,
936934
errorColor: Colors.white,
937935
backgroundColor: Colors.white,
938936
bottomAppBarColor: Colors.white,
@@ -1034,7 +1032,6 @@ void main() {
10341032

10351033
// DEPRECATED (newest deprecations at the bottom)
10361034
toggleableActiveColor: otherTheme.toggleableActiveColor,
1037-
selectedRowColor: otherTheme.selectedRowColor,
10381035
errorColor: otherTheme.errorColor,
10391036
backgroundColor: otherTheme.backgroundColor,
10401037
bottomAppBarColor: otherTheme.bottomAppBarColor,
@@ -1137,7 +1134,6 @@ void main() {
11371134

11381135
// DEPRECATED (newest deprecations at the bottom)
11391136
expect(themeDataCopy.toggleableActiveColor, equals(otherTheme.toggleableActiveColor));
1140-
expect(themeDataCopy.selectedRowColor, equals(otherTheme.selectedRowColor));
11411137
expect(themeDataCopy.errorColor, equals(otherTheme.errorColor));
11421138
expect(themeDataCopy.backgroundColor, equals(otherTheme.backgroundColor));
11431139
expect(themeDataCopy.bottomAppBarColor, equals(otherTheme.bottomAppBarColor));
@@ -1271,7 +1267,6 @@ void main() {
12711267
'tooltipTheme',
12721268
// DEPRECATED (newest deprecations at the bottom)
12731269
'toggleableActiveColor',
1274-
'selectedRowColor',
12751270
'errorColor',
12761271
'backgroundColor',
12771272
'bottomAppBarColor',

0 commit comments

Comments
 (0)