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
......
...@@ -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