Unverified Commit 252f6a02 authored by Kate Lovett's avatar Kate Lovett Committed by GitHub

Add fixes for ThemeData (#86369)

parent 81c91924
......@@ -15,6 +15,362 @@
version: 1
transforms:
# Changes made in https://github.com/flutter/flutter/pull/81336
- title: "Remove 'buttonColor'"
date: 2021-04-30
element:
uris: [ 'material.dart' ]
method: 'copyWith'
inClass: 'ThemeData'
changes:
- kind: 'removeParameter'
name: 'buttonColor'
# Changes made in https://github.com/flutter/flutter/pull/81336
- title: "Remove 'buttonColor'"
date: 2021-04-30
element:
uris: [ 'material.dart' ]
constructor: 'raw'
inClass: 'ThemeData'
changes:
- kind: 'removeParameter'
name: 'buttonColor'
# Changes made in https://github.com/flutter/flutter/pull/81336
- title: "Remove 'buttonColor'"
date: 2021-04-30
element:
uris: [ 'material.dart' ]
constructor: ''
inClass: 'ThemeData'
changes:
- kind: 'removeParameter'
name: 'buttonColor'
# Changes made in https://github.com/flutter/flutter/pull/81336
- title: "Remove 'accentIconTheme'"
date: 2021-04-30
element:
uris: [ 'material.dart' ]
method: 'copyWith'
inClass: 'ThemeData'
changes:
- kind: 'removeParameter'
name: 'accentIconTheme'
# Changes made in https://github.com/flutter/flutter/pull/81336
- title: "Remove 'accentIconTheme'"
date: 2021-04-30
element:
uris: [ 'material.dart' ]
constructor: 'raw'
inClass: 'ThemeData'
changes:
- kind: 'removeParameter'
name: 'accentIconTheme'
# Changes made in https://github.com/flutter/flutter/pull/81336
- title: "Remove 'accentIconTheme'"
date: 2021-04-30
element:
uris: [ 'material.dart' ]
constructor: ''
inClass: 'ThemeData'
changes:
- kind: 'removeParameter'
name: 'accentIconTheme'
# Changes made in https://github.com/flutter/flutter/pull/81336
- title: "Remove 'accentTextTheme'"
date: 2021-04-30
element:
uris: [ 'material.dart' ]
method: 'copyWith'
inClass: 'ThemeData'
changes:
- kind: 'removeParameter'
name: 'accentTextTheme'
# Changes made in https://github.com/flutter/flutter/pull/81336
- title: "Remove 'accentTextTheme'"
date: 2021-04-30
element:
uris: [ 'material.dart' ]
constructor: 'raw'
inClass: 'ThemeData'
changes:
- kind: 'removeParameter'
name: 'accentTextTheme'
# Changes made in https://github.com/flutter/flutter/pull/81336
- title: "Remove 'accentTextTheme'"
date: 2021-04-30
element:
uris: [ 'material.dart' ]
constructor: ''
inClass: 'ThemeData'
changes:
- kind: 'removeParameter'
name: 'accentTextTheme'
# Changes made in https://github.com/flutter/flutter/pull/81336
- title: "Remove 'accentColorBrightness'"
date: 2021-04-30
element:
uris: [ 'material.dart' ]
method: 'copyWith'
inClass: 'ThemeData'
changes:
- kind: 'removeParameter'
name: 'accentColorBrightness'
# Changes made in https://github.com/flutter/flutter/pull/81336
- title: "Remove 'accentColorBrightness'"
date: 2021-04-30
element:
uris: [ 'material.dart' ]
constructor: 'raw'
inClass: 'ThemeData'
changes:
- kind: 'removeParameter'
name: 'accentColorBrightness'
# Changes made in https://github.com/flutter/flutter/pull/81336
- title: "Remove 'accentColorBrightness'"
date: 2021-04-30
element:
uris: [ 'material.dart' ]
constructor: ''
inClass: 'ThemeData'
changes:
- kind: 'removeParameter'
name: 'accentColorBrightness'
# Changes made in https://github.com/flutter/flutter/pull/81336
- title: "Migrate to 'ColorScheme.secondary'"
date: 2021-04-30
element:
uris: [ 'material.dart' ]
field: 'accentColor'
inClass: 'ThemeData'
changes:
- kind: 'rename'
newName: 'colorScheme.secondary'
# Changes made in https://github.com/flutter/flutter/pull/81336
- title: "Migrate to 'ColorScheme.secondary'"
date: 2021-04-30
element:
uris: [ 'material.dart' ]
method: 'copyWith'
inClass: 'ThemeData'
oneOf:
- if: "accentColor != '' && primarySwatch == '' && colorScheme == ''"
changes:
- kind: 'addParameter'
index: 56
name: 'colorScheme'
style: optional_named
argumentValue:
expression: 'ColorScheme.fromSwatch().copyWith(secondary: {% accentColor %})'
requiredIf: "accentColor != '' && primarySwatch == '' && colorScheme ==''"
- kind: 'removeParameter'
name: 'accentColor'
- if: "accentColor != '' && primarySwatch != '' && colorScheme == ''"
changes:
- kind: 'addParameter'
index: 56
name: 'colorScheme'
style: optional_named
argumentValue:
expression: 'ColorScheme.fromSwatch(primarySwatch: {% primarySwatch %}).copyWith(secondary: {% accentColor %})'
requiredIf: "accentColor != '' && primarySwatch != '' && colorScheme == ''"
- kind: 'removeParameter'
name: 'accentColor'
- kind: 'removeParameter'
name: 'primarySwatch'
- if: "accentColor != '' && primarySwatch == '' && colorScheme != ''"
changes:
- kind: 'removeParameter'
name: 'colorScheme' # Remove to add back with modification
- kind: 'addParameter'
index: 56
name: 'colorScheme'
style: optional_named
argumentValue:
expression: '{% colorScheme %}.copyWith(secondary: {% accentColor %})'
requiredIf: "accentColor != '' && primarySwatch == '' && colorScheme != ''"
- kind: 'removeParameter'
name: 'accentColor'
- if: "accentColor != '' && primarySwatch != '' && colorScheme != ''"
changes:
- kind: 'removeParameter'
name: 'colorScheme' # Remove to add back with modification
- kind: 'addParameter'
index: 56
name: 'colorScheme'
style: optional_named
argumentValue:
expression: '{% colorScheme %}.copyWith(primarySwatch: {% primarySwatch %}, secondary: {% accentColor %})'
requiredIf: "accentColor != '' && primarySwatch != '' && colorScheme != ''"
- kind: 'removeParameter'
name: 'accentColor'
- kind: 'removeParameter'
name: 'primarySwatch'
variables:
accentColor:
kind: 'fragment'
value: 'arguments[accentColor]'
primarySwatch:
kind: 'fragment'
value: 'arguments[primarySwatch]'
colorScheme:
kind: 'fragment'
value: 'arguments[colorScheme]'
# Changes made in https://github.com/flutter/flutter/pull/81336
- title: "Migrate to 'ColorScheme.secondary'"
date: 2021-04-30
element:
uris: [ 'material.dart' ]
constructor: 'raw'
inClass: 'ThemeData'
oneOf:
- if: "accentColor != '' && primarySwatch == '' && colorScheme == ''"
changes:
- kind: 'addParameter'
index: 56
name: 'colorScheme'
style: optional_named
argumentValue:
expression: 'ColorScheme.fromSwatch().copyWith(secondary: {% accentColor %})'
requiredIf: "accentColor != '' && primarySwatch == '' && colorScheme ==''"
- kind: 'removeParameter'
name: 'accentColor'
- if: "accentColor != '' && primarySwatch != '' && colorScheme == ''"
changes:
- kind: 'addParameter'
index: 56
name: 'colorScheme'
style: optional_named
argumentValue:
expression: 'ColorScheme.fromSwatch(primarySwatch: {% primarySwatch %}).copyWith(secondary: {% accentColor %})'
requiredIf: "accentColor != '' && primarySwatch != '' && colorScheme == ''"
- kind: 'removeParameter'
name: 'accentColor'
- kind: 'removeParameter'
name: 'primarySwatch'
- if: "accentColor != '' && primarySwatch == '' && colorScheme != ''"
changes:
- kind: 'removeParameter'
name: 'colorScheme' # Remove to add back with modification
- kind: 'addParameter'
index: 56
name: 'colorScheme'
style: optional_named
argumentValue:
expression: '{% colorScheme %}.copyWith(secondary: {% accentColor %})'
requiredIf: "accentColor != '' && primarySwatch == '' && colorScheme != ''"
- kind: 'removeParameter'
name: 'accentColor'
- if: "accentColor != '' && primarySwatch != '' && colorScheme != ''"
changes:
- kind: 'removeParameter'
name: 'colorScheme' # Remove to add back with modification
- kind: 'addParameter'
index: 56
name: 'colorScheme'
style: optional_named
argumentValue:
expression: '{% colorScheme %}.copyWith(primarySwatch: {% primarySwatch %}, secondary: {% accentColor %})'
requiredIf: "accentColor != '' && primarySwatch != '' && colorScheme != ''"
- kind: 'removeParameter'
name: 'accentColor'
- kind: 'removeParameter'
name: 'primarySwatch'
variables:
accentColor:
kind: 'fragment'
value: 'arguments[accentColor]'
primarySwatch:
kind: 'fragment'
value: 'arguments[primarySwatch]'
colorScheme:
kind: 'fragment'
value: 'arguments[colorScheme]'
# Changes made in https://github.com/flutter/flutter/pull/81336
- title: "Migrate to 'ColorScheme.secondary'"
date: 2021-04-30
element:
uris: [ 'material.dart' ]
constructor: ''
inClass: 'ThemeData'
oneOf:
- if: "accentColor != '' && primarySwatch == '' && colorScheme == ''"
changes:
- kind: 'addParameter'
index: 56
name: 'colorScheme'
style: optional_named
argumentValue:
expression: 'ColorScheme.fromSwatch().copyWith(secondary: {% accentColor %})'
requiredIf: "accentColor != '' && primarySwatch == '' && colorScheme ==''"
- kind: 'removeParameter'
name: 'accentColor'
- if: "accentColor != '' && primarySwatch != '' && colorScheme == ''"
changes:
- kind: 'addParameter'
index: 56
name: 'colorScheme'
style: optional_named
argumentValue:
expression: 'ColorScheme.fromSwatch(primarySwatch: {% primarySwatch %}).copyWith(secondary: {% accentColor %})'
requiredIf: "accentColor != '' && primarySwatch != '' && colorScheme == ''"
- kind: 'removeParameter'
name: 'accentColor'
- kind: 'removeParameter'
name: 'primarySwatch'
- if: "accentColor != '' && primarySwatch == '' && colorScheme != ''"
changes:
- kind: 'removeParameter'
name: 'colorScheme' # Remove to add back with modification
- kind: 'addParameter'
index: 56
name: 'colorScheme'
style: optional_named
argumentValue:
expression: '{% colorScheme %}.copyWith(secondary: {% accentColor %})'
requiredIf: "accentColor != '' && primarySwatch == '' && colorScheme != ''"
- kind: 'removeParameter'
name: 'accentColor'
- if: "accentColor != '' && primarySwatch != '' && colorScheme != ''"
changes:
- kind: 'removeParameter'
name: 'colorScheme' # Remove to add back with modification
- kind: 'addParameter'
index: 56
name: 'colorScheme'
style: optional_named
argumentValue:
expression: '{% colorScheme %}.copyWith(primarySwatch: {% primarySwatch %}, secondary: {% accentColor %})'
requiredIf: "accentColor != '' && primarySwatch != '' && colorScheme != ''"
- kind: 'removeParameter'
name: 'accentColor'
- kind: 'removeParameter'
name: 'primarySwatch'
variables:
accentColor:
kind: 'fragment'
value: 'arguments[accentColor]'
primarySwatch:
kind: 'fragment'
value: 'arguments[primarySwatch]'
colorScheme:
kind: 'fragment'
value: 'arguments[colorScheme]'
# Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior
- title: "Migrate to 'clipBehavior'"
date: 2020-08-20
......
......@@ -331,6 +331,50 @@ void main() {
renderObjectToWidgetElement.moveChildRenderObject(renderObject, object);
renderObjectToWidgetElement.removeChildRenderObject(renderObject);
// Changes made in https://github.com/flutter/flutter/pull/81336
ThemeData themeData = ThemeData();
themeData = ThemeData(accentColor: Colors.red);
themeData = ThemeData(accentColor: Colors.red, primarySwatch: Colors.blue);
themeData = ThemeData(accentColor: Colors.red, colorScheme: ColorScheme.light());
themeData = ThemeData(accentColor: Colors.red, colorScheme: ColorScheme.light(), primarySwatch: Colors.blue);
themeData = ThemeData.raw(accentColor: Colors.red);
themeData = ThemeData.raw(accentColor: Colors.red, primarySwatch: Colors.blue);
themeData = ThemeData.raw(accentColor: Colors.red, colorScheme: ColorScheme.light());
themeData = ThemeData.raw(accentColor: Colors.red, colorScheme: ColorScheme.light(), primarySwatch: Colors.blue);
themeData = themeData.copyWith(accentColor: Colors.red);
themeData = themeData.copyWith(accentColor: Colors.red, primarySwatch: Colors.blue);
themeData = themeData.copyWith(accentColor: Colors.red, colorScheme: ColorScheme.light());
themeData = themeData.copyWith(accentColor: Colors.red, colorScheme: ColorScheme.light(), primarySwatch: Colors.blue);
themeData.accentColor;
// Changes made in https://github.com/flutter/flutter/pull/81336
ThemeData themeData = ThemeData();
themeData = ThemeData(accentColorBrightness: Brightness.dark);
themeData = ThemeData.raw(accentColorBrightness: Brightness.dark);
themeData = themeData.copyWith(accentColorBrightness: Brightness.dark);
themeData.accentColorBrightness; // Removing field reference not supported.
// Changes made in https://github.com/flutter/flutter/pull/81336
ThemeData themeData = ThemeData();
themeData = ThemeData(accentTextTheme: TextTheme());
themeData = ThemeData.raw(accentTextTheme: TextTheme());
themeData = themeData.copyWith(accentTextTheme: TextTheme());
themeData.accentTextTheme; // Removing field reference not supported.
// Changes made in https://github.com/flutter/flutter/pull/81336
ThemeData themeData = ThemeData();
themeData = ThemeData(accentIconTheme: IconThemeData());
themeData = ThemeData.raw(accentIconTheme: IconThemeData());
themeData = themeData.copyWith(accentIconTheme: IconThemeData());
themeData.accentIconTheme; // Removing field reference not supported.
// Changes made in https://github.com/flutter/flutter/pull/81336
ThemeData themeData = ThemeData();
themeData = ThemeData(buttonColor: Colors.red);
themeData = ThemeData.raw(buttonColor: Colors.red);
themeData = themeData.copyWith(buttonColor: Colors.red);
themeData.buttonColor; // Removing field reference not supported.
// Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior
ListWheelScrollView listWheelScrollView = ListWheelScrollView();
listWheelScrollView = ListWheelScrollView(clipToSize: true);
......
......@@ -303,6 +303,50 @@ void main() {
renderObjectToWidgetElement.moveRenderObjectChild(renderObject, object);
renderObjectToWidgetElement.removeRenderObjectChild(renderObject);
// Changes made in https://github.com/flutter/flutter/pull/81336
ThemeData themeData = ThemeData();
themeData = ThemeData(colorScheme: ColorScheme.fromSwatch().copyWith(secondary: Colors.red));
themeData = ThemeData(colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue).copyWith(secondary: Colors.red));
themeData = ThemeData(colorScheme: ColorScheme.light().copyWith(secondary: Colors.red));
themeData = ThemeData(colorScheme: ColorScheme.light().copyWith(primarySwatch: Colors.blue, secondary: Colors.red));
themeData = ThemeData.raw(colorScheme: ColorScheme.fromSwatch().copyWith(secondary: Colors.red));
themeData = ThemeData.raw(colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue).copyWith(secondary: Colors.red));
themeData = ThemeData.raw(colorScheme: ColorScheme.light().copyWith(secondary: Colors.red));
themeData = ThemeData.raw(colorScheme: ColorScheme.light().copyWith(primarySwatch: Colors.blue, secondary: Colors.red));
themeData = themeData.copyWith(colorScheme: ColorScheme.fromSwatch().copyWith(secondary: Colors.red));
themeData = themeData.copyWith(colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue).copyWith(secondary: Colors.red));
themeData = themeData.copyWith(colorScheme: ColorScheme.light().copyWith(secondary: Colors.red));
themeData = themeData.copyWith(colorScheme: ColorScheme.light().copyWith(primarySwatch: Colors.blue, secondary: Colors.red));
themeData.colorScheme.secondary;
// Changes made in https://github.com/flutter/flutter/pull/81336
ThemeData themeData = ThemeData();
themeData = ThemeData();
themeData = ThemeData.raw();
themeData = themeData.copyWith();
themeData.accentColorBrightness; // Removing field reference not supported.
// Changes made in https://github.com/flutter/flutter/pull/81336
ThemeData themeData = ThemeData();
themeData = ThemeData();
themeData = ThemeData.raw();
themeData = themeData.copyWith();
themeData.accentTextTheme; // Removing field reference not supported.
// Changes made in https://github.com/flutter/flutter/pull/81336
ThemeData themeData = ThemeData();
themeData = ThemeData();
themeData = ThemeData.raw();
themeData = themeData.copyWith();
themeData.accentIconTheme; // Removing field reference not supported.
// Changes made in https://github.com/flutter/flutter/pull/81336
ThemeData themeData = ThemeData();
themeData = ThemeData();
themeData = ThemeData.raw();
themeData = themeData.copyWith();
themeData.buttonColor; // Removing field reference not supported.
// Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior
ListWheelScrollView listWheelScrollView = ListWheelScrollView();
listWheelScrollView = ListWheelScrollView(clipBehavior: Clip.hardEdge);
......
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