Unverified Commit 5be1918b authored by Renzo Olivares's avatar Renzo Olivares Committed by GitHub

Remove deprecated `ThemeData.selectedRowColor` (#139080)

Part of: https://github.com/flutter/flutter/issues/139243
parent 0c280d47
......@@ -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.',
......@@ -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]!;
......@@ -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,
......@@ -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.',
......@@ -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,
......@@ -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.
......@@ -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.',
......@@ -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,
......@@ -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),
......@@ -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;
......@@ -2165,7 +2136,6 @@ class ThemeData with Diagnosticable {
tooltipTheme,
// DEPRECATED (newest deprecations at the bottom)
toggleableActiveColor,
selectedRowColor,
errorColor,
backgroundColor,
bottomAppBarColor,
......@@ -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));
......
......@@ -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,
......@@ -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,
......@@ -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,
......@@ -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));
......@@ -1271,7 +1267,6 @@ void main() {
'tooltipTheme',
// DEPRECATED (newest deprecations at the bottom)
'toggleableActiveColor',
'selectedRowColor',
'errorColor',
'backgroundColor',
'bottomAppBarColor',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment