Skip to content

Commit

Permalink
Remove deprecated ThemeData.selectedRowColor (#139080)
Browse files Browse the repository at this point in the history
Part of: #139243
  • Loading branch information
Renzo-Olivares committed Dec 14, 2023
1 parent 0c280d4 commit 5be1918
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 36 deletions.
31 changes: 0 additions & 31 deletions packages/flutter/lib/src/material/theme_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -374,11 +374,6 @@ class ThemeData with Diagnosticable {
'This feature was deprecated after v3.4.0-19.0.pre.',
)
Color? toggleableActiveColor,
@Deprecated(
'No longer used by the framework, please remove any reference to it. '
'This feature was deprecated after v3.1.0-0.0.pre.',
)
Color? selectedRowColor,
@Deprecated(
'Use colorScheme.error instead. '
'This feature was deprecated after v3.3.0-0.5.pre.',
Expand Down Expand Up @@ -480,7 +475,6 @@ class ThemeData with Diagnosticable {
errorColor: Colors.red[700],
brightness: effectiveBrightness,
);
selectedRowColor ??= Colors.grey[100]!;
unselectedWidgetColor ??= isDark ? Colors.white70 : Colors.black54;
// Spec doesn't specify a dark theme secondaryHeaderColor, this is a guess.
secondaryHeaderColor ??= isDark ? Colors.grey[700]! : primarySwatch[50]!;
Expand Down Expand Up @@ -671,7 +665,6 @@ class ThemeData with Diagnosticable {
tooltipTheme: tooltipTheme,
// DEPRECATED (newest deprecations at the bottom)
toggleableActiveColor: toggleableActiveColor,
selectedRowColor: selectedRowColor,
errorColor: errorColor,
backgroundColor: backgroundColor,
bottomAppBarColor: bottomAppBarColor,
Expand Down Expand Up @@ -788,11 +781,6 @@ class ThemeData with Diagnosticable {
'This feature was deprecated after v3.4.0-19.0.pre.',
)
Color? toggleableActiveColor,
@Deprecated(
'No longer used by the framework, please remove any reference to it. '
'This feature was deprecated after v3.1.0-0.0.pre.',
)
Color? selectedRowColor,
@Deprecated(
'Use colorScheme.error instead. '
'This feature was deprecated after v3.3.0-0.5.pre.',
Expand All @@ -812,7 +800,6 @@ class ThemeData with Diagnosticable {
}) : // DEPRECATED (newest deprecations at the bottom)
// should not be `required`, use getter pattern to avoid breakages.
_toggleableActiveColor = toggleableActiveColor,
_selectedRowColor = selectedRowColor,
_errorColor = errorColor,
_backgroundColor = backgroundColor,
_bottomAppBarColor = bottomAppBarColor,
Expand Down Expand Up @@ -1277,14 +1264,6 @@ class ThemeData with Diagnosticable {
// ...this should be the "50-value of secondary app color".
final Color secondaryHeaderColor;

/// The color used to highlight selected rows.
@Deprecated(
'No longer used by the framework, please remove any reference to it. '
'This feature was deprecated after v3.1.0-0.0.pre.',
)
Color get selectedRowColor => _selectedRowColor!;
final Color? _selectedRowColor;

/// The color that the [Material] widget uses to draw elevation shadows.
///
/// Defaults to fully opaque black.
Expand Down Expand Up @@ -1630,11 +1609,6 @@ class ThemeData with Diagnosticable {
'This feature was deprecated after v3.4.0-19.0.pre.',
)
Color? toggleableActiveColor,
@Deprecated(
'No longer used by the framework, please remove any reference to it. '
'This feature was deprecated after v3.1.0-0.0.pre.',
)
Color? selectedRowColor,
@Deprecated(
'Use colorScheme.error instead. '
'This feature was deprecated after v3.3.0-0.5.pre.',
Expand Down Expand Up @@ -1756,7 +1730,6 @@ class ThemeData with Diagnosticable {
tooltipTheme: tooltipTheme ?? this.tooltipTheme,
// DEPRECATED (newest deprecations at the bottom)
toggleableActiveColor: toggleableActiveColor ?? _toggleableActiveColor,
selectedRowColor: selectedRowColor ?? _selectedRowColor,
errorColor: errorColor ?? _errorColor,
backgroundColor: backgroundColor ?? _backgroundColor,
bottomAppBarColor: bottomAppBarColor ?? _bottomAppBarColor,
Expand Down Expand Up @@ -1955,7 +1928,6 @@ class ThemeData with Diagnosticable {
tooltipTheme: TooltipThemeData.lerp(a.tooltipTheme, b.tooltipTheme, t)!,
// DEPRECATED (newest deprecations at the bottom)
toggleableActiveColor: Color.lerp(a.toggleableActiveColor, b.toggleableActiveColor, t),
selectedRowColor: Color.lerp(a.selectedRowColor, b.selectedRowColor, t),
errorColor: Color.lerp(a.errorColor, b.errorColor, t),
backgroundColor: Color.lerp(a.backgroundColor, b.backgroundColor, t),
bottomAppBarColor: Color.lerp(a.bottomAppBarColor, b.bottomAppBarColor, t),
Expand Down Expand Up @@ -2061,7 +2033,6 @@ class ThemeData with Diagnosticable {
other.tooltipTheme == tooltipTheme &&
// DEPRECATED (newest deprecations at the bottom)
other.toggleableActiveColor == toggleableActiveColor &&
other.selectedRowColor == selectedRowColor &&
other.errorColor == errorColor &&
other.backgroundColor == backgroundColor &&
other.bottomAppBarColor == bottomAppBarColor;
Expand Down Expand Up @@ -2165,7 +2136,6 @@ class ThemeData with Diagnosticable {
tooltipTheme,
// DEPRECATED (newest deprecations at the bottom)
toggleableActiveColor,
selectedRowColor,
errorColor,
backgroundColor,
bottomAppBarColor,
Expand Down Expand Up @@ -2270,7 +2240,6 @@ class ThemeData with Diagnosticable {
properties.add(DiagnosticsProperty<TooltipThemeData>('tooltipTheme', tooltipTheme, level: DiagnosticLevel.debug));
// DEPRECATED (newest deprecations at the bottom)
properties.add(ColorProperty('toggleableActiveColor', toggleableActiveColor, defaultValue: defaultData.toggleableActiveColor, level: DiagnosticLevel.debug));
properties.add(ColorProperty('selectedRowColor', selectedRowColor, defaultValue: defaultData.selectedRowColor, level: DiagnosticLevel.debug));
properties.add(ColorProperty('errorColor', errorColor, defaultValue: defaultData.errorColor, level: DiagnosticLevel.debug));
properties.add(ColorProperty('backgroundColor', backgroundColor, defaultValue: defaultData.backgroundColor, level: DiagnosticLevel.debug));
properties.add(ColorProperty('bottomAppBarColor', bottomAppBarColor, defaultValue: defaultData.bottomAppBarColor, level: DiagnosticLevel.debug));
Expand Down
5 changes: 0 additions & 5 deletions packages/flutter/test/material/theme_data_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,6 @@ void main() {
tooltipTheme: const TooltipThemeData(height: 100),
// DEPRECATED (newest deprecations at the bottom)
toggleableActiveColor: Colors.black,
selectedRowColor: Colors.black,
errorColor: Colors.black,
backgroundColor: Colors.black,
bottomAppBarColor: Colors.black,
Expand Down Expand Up @@ -932,7 +931,6 @@ void main() {

// DEPRECATED (newest deprecations at the bottom)
toggleableActiveColor: Colors.white,
selectedRowColor: Colors.white,
errorColor: Colors.white,
backgroundColor: Colors.white,
bottomAppBarColor: Colors.white,
Expand Down Expand Up @@ -1034,7 +1032,6 @@ void main() {

// DEPRECATED (newest deprecations at the bottom)
toggleableActiveColor: otherTheme.toggleableActiveColor,
selectedRowColor: otherTheme.selectedRowColor,
errorColor: otherTheme.errorColor,
backgroundColor: otherTheme.backgroundColor,
bottomAppBarColor: otherTheme.bottomAppBarColor,
Expand Down Expand Up @@ -1137,7 +1134,6 @@ void main() {

// DEPRECATED (newest deprecations at the bottom)
expect(themeDataCopy.toggleableActiveColor, equals(otherTheme.toggleableActiveColor));
expect(themeDataCopy.selectedRowColor, equals(otherTheme.selectedRowColor));
expect(themeDataCopy.errorColor, equals(otherTheme.errorColor));
expect(themeDataCopy.backgroundColor, equals(otherTheme.backgroundColor));
expect(themeDataCopy.bottomAppBarColor, equals(otherTheme.bottomAppBarColor));
Expand Down Expand Up @@ -1271,7 +1267,6 @@ void main() {
'tooltipTheme',
// DEPRECATED (newest deprecations at the bottom)
'toggleableActiveColor',
'selectedRowColor',
'errorColor',
'backgroundColor',
'bottomAppBarColor',
Expand Down

0 comments on commit 5be1918

Please sign in to comment.