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

Deprecate ThemeData.selectedRowColor (#109070)

parent 543dac2f
......@@ -17,6 +17,39 @@
version: 1
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/
- title: "Migrate 'ThemeData.toggleableActiveColor' to individual themes"
date: 2022-05-18
......
......@@ -458,7 +458,6 @@ void main() {
highlightColor: Colors.black,
splashColor: Colors.black,
splashFactory: InkRipple.splashFactory,
selectedRowColor: Colors.black,
unselectedWidgetColor: Colors.black,
disabledColor: Colors.black,
buttonTheme: const ButtonThemeData(colorScheme: ColorScheme.dark()),
......
......@@ -669,7 +669,6 @@ void main() {
primaryColorLight: Colors.black,
scaffoldBackgroundColor: Colors.black,
secondaryHeaderColor: Colors.black,
selectedRowColor: Colors.black,
shadowColor: Colors.black,
splashColor: Colors.black,
unselectedWidgetColor: Colors.black,
......@@ -724,6 +723,7 @@ void main() {
primaryColorBrightness: Brightness.dark,
androidOverscrollIndicator: AndroidOverscrollIndicator.glow,
toggleableActiveColor: Colors.black,
selectedRowColor: Colors.black,
);
final SliderThemeData otherSliderTheme = SliderThemeData.fromPrimaryColors(
......@@ -780,7 +780,6 @@ void main() {
primaryColorLight: Colors.white,
scaffoldBackgroundColor: Colors.white,
secondaryHeaderColor: Colors.white,
selectedRowColor: Colors.white,
shadowColor: Colors.white,
splashColor: Colors.white,
unselectedWidgetColor: Colors.white,
......@@ -838,6 +837,7 @@ void main() {
primaryColorBrightness: Brightness.light,
androidOverscrollIndicator: AndroidOverscrollIndicator.stretch,
toggleableActiveColor: Colors.white,
selectedRowColor: Colors.white,
);
final ThemeData themeDataCopy = theme.copyWith(
......@@ -879,7 +879,6 @@ void main() {
primaryColorLight: otherTheme.primaryColorLight,
scaffoldBackgroundColor: otherTheme.scaffoldBackgroundColor,
secondaryHeaderColor: otherTheme.secondaryHeaderColor,
selectedRowColor: otherTheme.selectedRowColor,
shadowColor: otherTheme.shadowColor,
splashColor: otherTheme.splashColor,
unselectedWidgetColor: otherTheme.unselectedWidgetColor,
......@@ -937,6 +936,7 @@ void main() {
primaryColorBrightness: otherTheme.primaryColorBrightness,
androidOverscrollIndicator: otherTheme.androidOverscrollIndicator,
toggleableActiveColor: otherTheme.toggleableActiveColor,
selectedRowColor: otherTheme.selectedRowColor,
);
// For the sanity of the reader, make sure these properties are in the same
......@@ -977,7 +977,6 @@ void main() {
expect(themeDataCopy.primaryColorLight, equals(otherTheme.primaryColorLight));
expect(themeDataCopy.scaffoldBackgroundColor, equals(otherTheme.scaffoldBackgroundColor));
expect(themeDataCopy.secondaryHeaderColor, equals(otherTheme.secondaryHeaderColor));
expect(themeDataCopy.selectedRowColor, equals(otherTheme.selectedRowColor));
expect(themeDataCopy.shadowColor, equals(otherTheme.shadowColor));
expect(themeDataCopy.splashColor, equals(otherTheme.splashColor));
expect(themeDataCopy.unselectedWidgetColor, equals(otherTheme.unselectedWidgetColor));
......@@ -1040,6 +1039,7 @@ void main() {
expect(themeDataCopy.primaryColorBrightness, equals(otherTheme.primaryColorBrightness));
expect(themeDataCopy.androidOverscrollIndicator, equals(otherTheme.androidOverscrollIndicator));
expect(themeDataCopy.toggleableActiveColor, equals(otherTheme.toggleableActiveColor));
expect(themeDataCopy.selectedRowColor, equals(otherTheme.selectedRowColor));
});
testWidgets('ThemeData.toString has less than 200 characters output', (WidgetTester tester) async {
......@@ -1110,7 +1110,6 @@ void main() {
'dividerColor',
'highlightColor',
'splashColor',
'selectedRowColor',
'unselectedWidgetColor',
'disabledColor',
'secondaryHeaderColor',
......@@ -1170,6 +1169,7 @@ void main() {
'primaryColorBrightness',
'androidOverscrollIndicator',
'toggleableActiveColor',
'selectedRowColor',
};
final DiagnosticPropertiesBuilder properties = DiagnosticPropertiesBuilder();
......
......@@ -585,4 +585,11 @@ void main() {
toggleableActiveColor: Colors.black,
);
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() {
),
);
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