Unverified Commit 8c44c162 authored by Kate Lovett's avatar Kate Lovett Committed by GitHub

Deprecate ThemeData.selectedRowColor (#109070)

parent 543dac2f
...@@ -17,6 +17,39 @@ ...@@ -17,6 +17,39 @@
version: 1 version: 1
transforms: transforms:
# Changes made in https://github.com/flutter/flutter/pull/109070
- title: "Remove 'selectedRowColor'"
date: 2022-08-05
element:
uris: [ 'material.dart' ]
method: 'copyWith'
inClass: 'ThemeData'
changes:
- kind: 'removeParameter'
name: 'selectedRowColor'
# Changes made in https://github.com/flutter/flutter/pull/109070
- title: "Remove 'selectedRowColor'"
date: 2022-08-05
element:
uris: [ 'material.dart' ]
constructor: 'raw'
inClass: 'ThemeData'
changes:
- kind: 'removeParameter'
name: 'selectedRowColor'
# Changes made in https://github.com/flutter/flutter/pull/109070
- title: "Remove 'selectedRowColor'"
date: 2022-08-05
element:
uris: [ 'material.dart' ]
constructor: ''
inClass: 'ThemeData'
changes:
- kind: 'removeParameter'
name: 'selectedRowColor'
# Changes made in https://github.com/flutter/flutter/pull/97972/ # Changes made in https://github.com/flutter/flutter/pull/97972/
- title: "Migrate 'ThemeData.toggleableActiveColor' to individual themes" - title: "Migrate 'ThemeData.toggleableActiveColor' to individual themes"
date: 2022-05-18 date: 2022-05-18
......
...@@ -313,7 +313,6 @@ class ThemeData with Diagnosticable { ...@@ -313,7 +313,6 @@ class ThemeData with Diagnosticable {
MaterialColor? primarySwatch, MaterialColor? primarySwatch,
Color? scaffoldBackgroundColor, Color? scaffoldBackgroundColor,
Color? secondaryHeaderColor, Color? secondaryHeaderColor,
Color? selectedRowColor,
Color? shadowColor, Color? shadowColor,
Color? splashColor, Color? splashColor,
Color? unselectedWidgetColor, Color? unselectedWidgetColor,
...@@ -415,6 +414,11 @@ class ThemeData with Diagnosticable { ...@@ -415,6 +414,11 @@ class ThemeData with Diagnosticable {
'This feature was deprecated after v2.13.0-0.4.pre.', 'This feature was deprecated after v2.13.0-0.4.pre.',
) )
Color? toggleableActiveColor, 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,
}) { }) {
// GENERAL CONFIGURATION // GENERAL CONFIGURATION
cupertinoOverrideTheme = cupertinoOverrideTheme?.noDefault(); cupertinoOverrideTheme = cupertinoOverrideTheme?.noDefault();
...@@ -622,7 +626,6 @@ class ThemeData with Diagnosticable { ...@@ -622,7 +626,6 @@ class ThemeData with Diagnosticable {
primaryColorLight: primaryColorLight, primaryColorLight: primaryColorLight,
scaffoldBackgroundColor: scaffoldBackgroundColor, scaffoldBackgroundColor: scaffoldBackgroundColor,
secondaryHeaderColor: secondaryHeaderColor, secondaryHeaderColor: secondaryHeaderColor,
selectedRowColor: selectedRowColor,
shadowColor: shadowColor, shadowColor: shadowColor,
splashColor: splashColor, splashColor: splashColor,
unselectedWidgetColor: unselectedWidgetColor, unselectedWidgetColor: unselectedWidgetColor,
...@@ -677,6 +680,7 @@ class ThemeData with Diagnosticable { ...@@ -677,6 +680,7 @@ class ThemeData with Diagnosticable {
primaryColorBrightness: primaryColorBrightness, primaryColorBrightness: primaryColorBrightness,
androidOverscrollIndicator: androidOverscrollIndicator, androidOverscrollIndicator: androidOverscrollIndicator,
toggleableActiveColor: toggleableActiveColor, toggleableActiveColor: toggleableActiveColor,
selectedRowColor: selectedRowColor,
); );
} }
...@@ -728,7 +732,6 @@ class ThemeData with Diagnosticable { ...@@ -728,7 +732,6 @@ class ThemeData with Diagnosticable {
required this.primaryColorLight, required this.primaryColorLight,
required this.scaffoldBackgroundColor, required this.scaffoldBackgroundColor,
required this.secondaryHeaderColor, required this.secondaryHeaderColor,
required this.selectedRowColor,
required this.shadowColor, required this.shadowColor,
required this.splashColor, required this.splashColor,
required this.unselectedWidgetColor, required this.unselectedWidgetColor,
...@@ -829,6 +832,11 @@ class ThemeData with Diagnosticable { ...@@ -829,6 +832,11 @@ class ThemeData with Diagnosticable {
'This feature was deprecated after v2.13.0-0.4.pre.', 'This feature was deprecated after v2.13.0-0.4.pre.',
) )
Color? toggleableActiveColor, 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 (newest deprecations at the bottom) }) : // DEPRECATED (newest deprecations at the bottom)
// should not be `required`, use getter pattern to avoid breakages. // should not be `required`, use getter pattern to avoid breakages.
_accentColor = accentColor, _accentColor = accentColor,
...@@ -839,6 +847,7 @@ class ThemeData with Diagnosticable { ...@@ -839,6 +847,7 @@ class ThemeData with Diagnosticable {
_fixTextFieldOutlineLabel = fixTextFieldOutlineLabel, _fixTextFieldOutlineLabel = fixTextFieldOutlineLabel,
_primaryColorBrightness = primaryColorBrightness, _primaryColorBrightness = primaryColorBrightness,
_toggleableActiveColor = toggleableActiveColor, _toggleableActiveColor = toggleableActiveColor,
_selectedRowColor = selectedRowColor,
// GENERAL CONFIGURATION // GENERAL CONFIGURATION
assert(applyElevationOverlayColor != null), assert(applyElevationOverlayColor != null),
assert(extensions != null), assert(extensions != null),
...@@ -870,7 +879,6 @@ class ThemeData with Diagnosticable { ...@@ -870,7 +879,6 @@ class ThemeData with Diagnosticable {
assert(primaryColorLight != null), assert(primaryColorLight != null),
assert(scaffoldBackgroundColor != null), assert(scaffoldBackgroundColor != null),
assert(secondaryHeaderColor != null), assert(secondaryHeaderColor != null),
assert(selectedRowColor != null),
assert(shadowColor != null), assert(shadowColor != null),
assert(splashColor != null), assert(splashColor != null),
assert(toggleableActiveColor != null), assert(toggleableActiveColor != null),
...@@ -1341,7 +1349,12 @@ class ThemeData with Diagnosticable { ...@@ -1341,7 +1349,12 @@ class ThemeData with Diagnosticable {
final Color secondaryHeaderColor; final Color secondaryHeaderColor;
/// The color used to highlight selected rows. /// The color used to highlight selected rows.
final Color selectedRowColor; @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. /// The color that the [Material] widget uses to draw elevation shadows.
/// ///
...@@ -1696,7 +1709,6 @@ class ThemeData with Diagnosticable { ...@@ -1696,7 +1709,6 @@ class ThemeData with Diagnosticable {
Color? primaryColorLight, Color? primaryColorLight,
Color? scaffoldBackgroundColor, Color? scaffoldBackgroundColor,
Color? secondaryHeaderColor, Color? secondaryHeaderColor,
Color? selectedRowColor,
Color? shadowColor, Color? shadowColor,
Color? splashColor, Color? splashColor,
Color? unselectedWidgetColor, Color? unselectedWidgetColor,
...@@ -1797,6 +1809,11 @@ class ThemeData with Diagnosticable { ...@@ -1797,6 +1809,11 @@ class ThemeData with Diagnosticable {
'This feature was deprecated after v2.13.0-0.4.pre.', 'This feature was deprecated after v2.13.0-0.4.pre.',
) )
Color? toggleableActiveColor, 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,
}) { }) {
cupertinoOverrideTheme = cupertinoOverrideTheme?.noDefault(); cupertinoOverrideTheme = cupertinoOverrideTheme?.noDefault();
return ThemeData.raw( return ThemeData.raw(
...@@ -1837,7 +1854,6 @@ class ThemeData with Diagnosticable { ...@@ -1837,7 +1854,6 @@ class ThemeData with Diagnosticable {
primaryColorLight: primaryColorLight ?? this.primaryColorLight, primaryColorLight: primaryColorLight ?? this.primaryColorLight,
scaffoldBackgroundColor: scaffoldBackgroundColor ?? this.scaffoldBackgroundColor, scaffoldBackgroundColor: scaffoldBackgroundColor ?? this.scaffoldBackgroundColor,
secondaryHeaderColor: secondaryHeaderColor ?? this.secondaryHeaderColor, secondaryHeaderColor: secondaryHeaderColor ?? this.secondaryHeaderColor,
selectedRowColor: selectedRowColor ?? this.selectedRowColor,
shadowColor: shadowColor ?? this.shadowColor, shadowColor: shadowColor ?? this.shadowColor,
splashColor: splashColor ?? this.splashColor, splashColor: splashColor ?? this.splashColor,
unselectedWidgetColor: unselectedWidgetColor ?? this.unselectedWidgetColor, unselectedWidgetColor: unselectedWidgetColor ?? this.unselectedWidgetColor,
...@@ -1883,15 +1899,16 @@ class ThemeData with Diagnosticable { ...@@ -1883,15 +1899,16 @@ class ThemeData with Diagnosticable {
toggleButtonsTheme: toggleButtonsTheme ?? this.toggleButtonsTheme, toggleButtonsTheme: toggleButtonsTheme ?? this.toggleButtonsTheme,
tooltipTheme: tooltipTheme ?? this.tooltipTheme, tooltipTheme: tooltipTheme ?? this.tooltipTheme,
// DEPRECATED (newest deprecations at the bottom) // DEPRECATED (newest deprecations at the bottom)
accentColor: accentColor ?? this.accentColor, accentColor: accentColor ?? _accentColor,
accentColorBrightness: accentColorBrightness ?? this.accentColorBrightness, accentColorBrightness: accentColorBrightness ?? _accentColorBrightness,
accentTextTheme: accentTextTheme ?? this.accentTextTheme, accentTextTheme: accentTextTheme ?? _accentTextTheme,
accentIconTheme: accentIconTheme ?? this.accentIconTheme, accentIconTheme: accentIconTheme ?? _accentIconTheme,
buttonColor: buttonColor ?? this.buttonColor, buttonColor: buttonColor ?? _buttonColor,
fixTextFieldOutlineLabel: fixTextFieldOutlineLabel ?? this.fixTextFieldOutlineLabel, fixTextFieldOutlineLabel: fixTextFieldOutlineLabel ?? _fixTextFieldOutlineLabel,
primaryColorBrightness: primaryColorBrightness ?? this.primaryColorBrightness, primaryColorBrightness: primaryColorBrightness ?? _primaryColorBrightness,
androidOverscrollIndicator: androidOverscrollIndicator ?? this.androidOverscrollIndicator, androidOverscrollIndicator: androidOverscrollIndicator ?? this.androidOverscrollIndicator,
toggleableActiveColor: toggleableActiveColor ?? this.toggleableActiveColor, toggleableActiveColor: toggleableActiveColor ?? _toggleableActiveColor,
selectedRowColor: selectedRowColor ?? _selectedRowColor,
); );
} }
...@@ -2036,7 +2053,6 @@ class ThemeData with Diagnosticable { ...@@ -2036,7 +2053,6 @@ class ThemeData with Diagnosticable {
primaryColorLight: Color.lerp(a.primaryColorLight, b.primaryColorLight, t)!, primaryColorLight: Color.lerp(a.primaryColorLight, b.primaryColorLight, t)!,
scaffoldBackgroundColor: Color.lerp(a.scaffoldBackgroundColor, b.scaffoldBackgroundColor, t)!, scaffoldBackgroundColor: Color.lerp(a.scaffoldBackgroundColor, b.scaffoldBackgroundColor, t)!,
secondaryHeaderColor: Color.lerp(a.secondaryHeaderColor, b.secondaryHeaderColor, t)!, secondaryHeaderColor: Color.lerp(a.secondaryHeaderColor, b.secondaryHeaderColor, t)!,
selectedRowColor: Color.lerp(a.selectedRowColor, b.selectedRowColor, t)!,
shadowColor: Color.lerp(a.shadowColor, b.shadowColor, t)!, shadowColor: Color.lerp(a.shadowColor, b.shadowColor, t)!,
splashColor: Color.lerp(a.splashColor, b.splashColor, t)!, splashColor: Color.lerp(a.splashColor, b.splashColor, t)!,
unselectedWidgetColor: Color.lerp(a.unselectedWidgetColor, b.unselectedWidgetColor, t)!, unselectedWidgetColor: Color.lerp(a.unselectedWidgetColor, b.unselectedWidgetColor, t)!,
...@@ -2091,6 +2107,7 @@ class ThemeData with Diagnosticable { ...@@ -2091,6 +2107,7 @@ class ThemeData with Diagnosticable {
primaryColorBrightness: t < 0.5 ? a.primaryColorBrightness : b.primaryColorBrightness, primaryColorBrightness: t < 0.5 ? a.primaryColorBrightness : b.primaryColorBrightness,
androidOverscrollIndicator:t < 0.5 ? a.androidOverscrollIndicator : b.androidOverscrollIndicator, androidOverscrollIndicator:t < 0.5 ? a.androidOverscrollIndicator : b.androidOverscrollIndicator,
toggleableActiveColor: Color.lerp(a.toggleableActiveColor, b.toggleableActiveColor, t), toggleableActiveColor: Color.lerp(a.toggleableActiveColor, b.toggleableActiveColor, t),
selectedRowColor: Color.lerp(a.selectedRowColor, b.selectedRowColor, t),
); );
} }
...@@ -2137,7 +2154,6 @@ class ThemeData with Diagnosticable { ...@@ -2137,7 +2154,6 @@ class ThemeData with Diagnosticable {
other.primaryColorLight == primaryColorLight && other.primaryColorLight == primaryColorLight &&
other.scaffoldBackgroundColor == scaffoldBackgroundColor && other.scaffoldBackgroundColor == scaffoldBackgroundColor &&
other.secondaryHeaderColor == secondaryHeaderColor && other.secondaryHeaderColor == secondaryHeaderColor &&
other.selectedRowColor == selectedRowColor &&
other.shadowColor == shadowColor && other.shadowColor == shadowColor &&
other.splashColor == splashColor && other.splashColor == splashColor &&
other.unselectedWidgetColor == unselectedWidgetColor && other.unselectedWidgetColor == unselectedWidgetColor &&
...@@ -2191,7 +2207,8 @@ class ThemeData with Diagnosticable { ...@@ -2191,7 +2207,8 @@ class ThemeData with Diagnosticable {
other.fixTextFieldOutlineLabel == fixTextFieldOutlineLabel && other.fixTextFieldOutlineLabel == fixTextFieldOutlineLabel &&
other.primaryColorBrightness == primaryColorBrightness && other.primaryColorBrightness == primaryColorBrightness &&
other.androidOverscrollIndicator == androidOverscrollIndicator && other.androidOverscrollIndicator == androidOverscrollIndicator &&
other.toggleableActiveColor == toggleableActiveColor; other.toggleableActiveColor == toggleableActiveColor &&
other.selectedRowColor == selectedRowColor;
} }
@override @override
...@@ -2235,7 +2252,6 @@ class ThemeData with Diagnosticable { ...@@ -2235,7 +2252,6 @@ class ThemeData with Diagnosticable {
primaryColorLight, primaryColorLight,
scaffoldBackgroundColor, scaffoldBackgroundColor,
secondaryHeaderColor, secondaryHeaderColor,
selectedRowColor,
shadowColor, shadowColor,
splashColor, splashColor,
unselectedWidgetColor, unselectedWidgetColor,
...@@ -2290,6 +2306,7 @@ class ThemeData with Diagnosticable { ...@@ -2290,6 +2306,7 @@ class ThemeData with Diagnosticable {
primaryColorBrightness, primaryColorBrightness,
androidOverscrollIndicator, androidOverscrollIndicator,
toggleableActiveColor, toggleableActiveColor,
selectedRowColor,
]; ];
return Object.hashAll(values); return Object.hashAll(values);
} }
...@@ -2335,7 +2352,6 @@ class ThemeData with Diagnosticable { ...@@ -2335,7 +2352,6 @@ class ThemeData with Diagnosticable {
properties.add(ColorProperty('primaryColor', primaryColor, defaultValue: defaultData.primaryColor, level: DiagnosticLevel.debug)); properties.add(ColorProperty('primaryColor', primaryColor, defaultValue: defaultData.primaryColor, level: DiagnosticLevel.debug));
properties.add(ColorProperty('scaffoldBackgroundColor', scaffoldBackgroundColor, defaultValue: defaultData.scaffoldBackgroundColor, level: DiagnosticLevel.debug)); properties.add(ColorProperty('scaffoldBackgroundColor', scaffoldBackgroundColor, defaultValue: defaultData.scaffoldBackgroundColor, level: DiagnosticLevel.debug));
properties.add(ColorProperty('secondaryHeaderColor', secondaryHeaderColor, defaultValue: defaultData.secondaryHeaderColor, level: DiagnosticLevel.debug)); properties.add(ColorProperty('secondaryHeaderColor', secondaryHeaderColor, defaultValue: defaultData.secondaryHeaderColor, level: DiagnosticLevel.debug));
properties.add(ColorProperty('selectedRowColor', selectedRowColor, defaultValue: defaultData.selectedRowColor, level: DiagnosticLevel.debug));
properties.add(ColorProperty('shadowColor', shadowColor, defaultValue: defaultData.shadowColor, level: DiagnosticLevel.debug)); properties.add(ColorProperty('shadowColor', shadowColor, defaultValue: defaultData.shadowColor, level: DiagnosticLevel.debug));
properties.add(ColorProperty('splashColor', splashColor, defaultValue: defaultData.splashColor, level: DiagnosticLevel.debug)); properties.add(ColorProperty('splashColor', splashColor, defaultValue: defaultData.splashColor, level: DiagnosticLevel.debug));
properties.add(ColorProperty('unselectedWidgetColor', unselectedWidgetColor, defaultValue: defaultData.unselectedWidgetColor, level: DiagnosticLevel.debug)); properties.add(ColorProperty('unselectedWidgetColor', unselectedWidgetColor, defaultValue: defaultData.unselectedWidgetColor, level: DiagnosticLevel.debug));
...@@ -2390,6 +2406,7 @@ class ThemeData with Diagnosticable { ...@@ -2390,6 +2406,7 @@ class ThemeData with Diagnosticable {
properties.add(EnumProperty<Brightness>('primaryColorBrightness', primaryColorBrightness, defaultValue: defaultData.primaryColorBrightness, level: DiagnosticLevel.debug)); properties.add(EnumProperty<Brightness>('primaryColorBrightness', primaryColorBrightness, defaultValue: defaultData.primaryColorBrightness, level: DiagnosticLevel.debug));
properties.add(EnumProperty<AndroidOverscrollIndicator>('androidOverscrollIndicator', androidOverscrollIndicator, defaultValue: null, level: DiagnosticLevel.debug)); properties.add(EnumProperty<AndroidOverscrollIndicator>('androidOverscrollIndicator', androidOverscrollIndicator, defaultValue: null, level: DiagnosticLevel.debug));
properties.add(ColorProperty('toggleableActiveColor', toggleableActiveColor, defaultValue: defaultData.toggleableActiveColor, level: DiagnosticLevel.debug)); properties.add(ColorProperty('toggleableActiveColor', toggleableActiveColor, defaultValue: defaultData.toggleableActiveColor, level: DiagnosticLevel.debug));
properties.add(ColorProperty('selectedRowColor', selectedRowColor, defaultValue: defaultData.selectedRowColor, level: DiagnosticLevel.debug));
} }
} }
......
...@@ -458,7 +458,6 @@ void main() { ...@@ -458,7 +458,6 @@ void main() {
highlightColor: Colors.black, highlightColor: Colors.black,
splashColor: Colors.black, splashColor: Colors.black,
splashFactory: InkRipple.splashFactory, splashFactory: InkRipple.splashFactory,
selectedRowColor: Colors.black,
unselectedWidgetColor: Colors.black, unselectedWidgetColor: Colors.black,
disabledColor: Colors.black, disabledColor: Colors.black,
buttonTheme: const ButtonThemeData(colorScheme: ColorScheme.dark()), buttonTheme: const ButtonThemeData(colorScheme: ColorScheme.dark()),
......
...@@ -669,7 +669,6 @@ void main() { ...@@ -669,7 +669,6 @@ void main() {
primaryColorLight: Colors.black, primaryColorLight: Colors.black,
scaffoldBackgroundColor: Colors.black, scaffoldBackgroundColor: Colors.black,
secondaryHeaderColor: Colors.black, secondaryHeaderColor: Colors.black,
selectedRowColor: Colors.black,
shadowColor: Colors.black, shadowColor: Colors.black,
splashColor: Colors.black, splashColor: Colors.black,
unselectedWidgetColor: Colors.black, unselectedWidgetColor: Colors.black,
...@@ -724,6 +723,7 @@ void main() { ...@@ -724,6 +723,7 @@ void main() {
primaryColorBrightness: Brightness.dark, primaryColorBrightness: Brightness.dark,
androidOverscrollIndicator: AndroidOverscrollIndicator.glow, androidOverscrollIndicator: AndroidOverscrollIndicator.glow,
toggleableActiveColor: Colors.black, toggleableActiveColor: Colors.black,
selectedRowColor: Colors.black,
); );
final SliderThemeData otherSliderTheme = SliderThemeData.fromPrimaryColors( final SliderThemeData otherSliderTheme = SliderThemeData.fromPrimaryColors(
...@@ -780,7 +780,6 @@ void main() { ...@@ -780,7 +780,6 @@ void main() {
primaryColorLight: Colors.white, primaryColorLight: Colors.white,
scaffoldBackgroundColor: Colors.white, scaffoldBackgroundColor: Colors.white,
secondaryHeaderColor: Colors.white, secondaryHeaderColor: Colors.white,
selectedRowColor: Colors.white,
shadowColor: Colors.white, shadowColor: Colors.white,
splashColor: Colors.white, splashColor: Colors.white,
unselectedWidgetColor: Colors.white, unselectedWidgetColor: Colors.white,
...@@ -838,6 +837,7 @@ void main() { ...@@ -838,6 +837,7 @@ void main() {
primaryColorBrightness: Brightness.light, primaryColorBrightness: Brightness.light,
androidOverscrollIndicator: AndroidOverscrollIndicator.stretch, androidOverscrollIndicator: AndroidOverscrollIndicator.stretch,
toggleableActiveColor: Colors.white, toggleableActiveColor: Colors.white,
selectedRowColor: Colors.white,
); );
final ThemeData themeDataCopy = theme.copyWith( final ThemeData themeDataCopy = theme.copyWith(
...@@ -879,7 +879,6 @@ void main() { ...@@ -879,7 +879,6 @@ void main() {
primaryColorLight: otherTheme.primaryColorLight, primaryColorLight: otherTheme.primaryColorLight,
scaffoldBackgroundColor: otherTheme.scaffoldBackgroundColor, scaffoldBackgroundColor: otherTheme.scaffoldBackgroundColor,
secondaryHeaderColor: otherTheme.secondaryHeaderColor, secondaryHeaderColor: otherTheme.secondaryHeaderColor,
selectedRowColor: otherTheme.selectedRowColor,
shadowColor: otherTheme.shadowColor, shadowColor: otherTheme.shadowColor,
splashColor: otherTheme.splashColor, splashColor: otherTheme.splashColor,
unselectedWidgetColor: otherTheme.unselectedWidgetColor, unselectedWidgetColor: otherTheme.unselectedWidgetColor,
...@@ -937,6 +936,7 @@ void main() { ...@@ -937,6 +936,7 @@ void main() {
primaryColorBrightness: otherTheme.primaryColorBrightness, primaryColorBrightness: otherTheme.primaryColorBrightness,
androidOverscrollIndicator: otherTheme.androidOverscrollIndicator, androidOverscrollIndicator: otherTheme.androidOverscrollIndicator,
toggleableActiveColor: otherTheme.toggleableActiveColor, toggleableActiveColor: otherTheme.toggleableActiveColor,
selectedRowColor: otherTheme.selectedRowColor,
); );
// For the sanity of the reader, make sure these properties are in the same // For the sanity of the reader, make sure these properties are in the same
...@@ -977,7 +977,6 @@ void main() { ...@@ -977,7 +977,6 @@ void main() {
expect(themeDataCopy.primaryColorLight, equals(otherTheme.primaryColorLight)); expect(themeDataCopy.primaryColorLight, equals(otherTheme.primaryColorLight));
expect(themeDataCopy.scaffoldBackgroundColor, equals(otherTheme.scaffoldBackgroundColor)); expect(themeDataCopy.scaffoldBackgroundColor, equals(otherTheme.scaffoldBackgroundColor));
expect(themeDataCopy.secondaryHeaderColor, equals(otherTheme.secondaryHeaderColor)); expect(themeDataCopy.secondaryHeaderColor, equals(otherTheme.secondaryHeaderColor));
expect(themeDataCopy.selectedRowColor, equals(otherTheme.selectedRowColor));
expect(themeDataCopy.shadowColor, equals(otherTheme.shadowColor)); expect(themeDataCopy.shadowColor, equals(otherTheme.shadowColor));
expect(themeDataCopy.splashColor, equals(otherTheme.splashColor)); expect(themeDataCopy.splashColor, equals(otherTheme.splashColor));
expect(themeDataCopy.unselectedWidgetColor, equals(otherTheme.unselectedWidgetColor)); expect(themeDataCopy.unselectedWidgetColor, equals(otherTheme.unselectedWidgetColor));
...@@ -1040,6 +1039,7 @@ void main() { ...@@ -1040,6 +1039,7 @@ void main() {
expect(themeDataCopy.primaryColorBrightness, equals(otherTheme.primaryColorBrightness)); expect(themeDataCopy.primaryColorBrightness, equals(otherTheme.primaryColorBrightness));
expect(themeDataCopy.androidOverscrollIndicator, equals(otherTheme.androidOverscrollIndicator)); expect(themeDataCopy.androidOverscrollIndicator, equals(otherTheme.androidOverscrollIndicator));
expect(themeDataCopy.toggleableActiveColor, equals(otherTheme.toggleableActiveColor)); expect(themeDataCopy.toggleableActiveColor, equals(otherTheme.toggleableActiveColor));
expect(themeDataCopy.selectedRowColor, equals(otherTheme.selectedRowColor));
}); });
testWidgets('ThemeData.toString has less than 200 characters output', (WidgetTester tester) async { testWidgets('ThemeData.toString has less than 200 characters output', (WidgetTester tester) async {
...@@ -1110,7 +1110,6 @@ void main() { ...@@ -1110,7 +1110,6 @@ void main() {
'dividerColor', 'dividerColor',
'highlightColor', 'highlightColor',
'splashColor', 'splashColor',
'selectedRowColor',
'unselectedWidgetColor', 'unselectedWidgetColor',
'disabledColor', 'disabledColor',
'secondaryHeaderColor', 'secondaryHeaderColor',
...@@ -1170,6 +1169,7 @@ void main() { ...@@ -1170,6 +1169,7 @@ void main() {
'primaryColorBrightness', 'primaryColorBrightness',
'androidOverscrollIndicator', 'androidOverscrollIndicator',
'toggleableActiveColor', 'toggleableActiveColor',
'selectedRowColor',
}; };
final DiagnosticPropertiesBuilder properties = DiagnosticPropertiesBuilder(); final DiagnosticPropertiesBuilder properties = DiagnosticPropertiesBuilder();
......
...@@ -585,4 +585,11 @@ void main() { ...@@ -585,4 +585,11 @@ void main() {
toggleableActiveColor: Colors.black, toggleableActiveColor: Colors.black,
); );
themeData.toggleableActiveColor; // Removing field reference not supported. themeData.toggleableActiveColor; // Removing field reference not supported.
// Changes made in https://github.com/flutter/flutter/pull/109070
ThemeData themeData = ThemeData();
themeData = ThemeData(selectedRowColor: Brightness.dark);
themeData = ThemeData.raw(selectedRowColor: Brightness.dark);
themeData = themeData.copyWith(selectedRowColor: Brightness.dark);
themeData.selectedRowColor; // Removing field reference not supported.
} }
...@@ -788,4 +788,11 @@ void main() { ...@@ -788,4 +788,11 @@ void main() {
), ),
); );
themeData.toggleableActiveColor; // Removing field reference not supported. themeData.toggleableActiveColor; // Removing field reference not supported.
// Changes made in https://github.com/flutter/flutter/pull/109070
ThemeData themeData = ThemeData();
themeData = ThemeData();
themeData = ThemeData.raw();
themeData = themeData.copyWith();
themeData.selectedRowColor; // Removing field reference not supported.
} }
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