Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
252f6a02
Unverified
Commit
252f6a02
authored
Jul 14, 2021
by
Kate Lovett
Committed by
GitHub
Jul 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add fixes for ThemeData (#86369)
parent
81c91924
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
444 additions
and
0 deletions
+444
-0
fix_data.yaml
packages/flutter/lib/fix_data.yaml
+356
-0
material.dart
packages/flutter/test_fixes/material.dart
+44
-0
material.dart.expect
packages/flutter/test_fixes/material.dart.expect
+44
-0
No files found.
packages/flutter/lib/fix_data.yaml
View file @
252f6a02
...
@@ -15,6 +15,362 @@
...
@@ -15,6 +15,362 @@
version
:
1
version
:
1
transforms
:
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
# Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior
-
title
:
"
Migrate
to
'clipBehavior'"
-
title
:
"
Migrate
to
'clipBehavior'"
date
:
2020-08-20
date
:
2020-08-20
...
...
packages/flutter/test_fixes/material.dart
View file @
252f6a02
...
@@ -331,6 +331,50 @@ void main() {
...
@@ -331,6 +331,50 @@ void main() {
renderObjectToWidgetElement
.
moveChildRenderObject
(
renderObject
,
object
);
renderObjectToWidgetElement
.
moveChildRenderObject
(
renderObject
,
object
);
renderObjectToWidgetElement
.
removeChildRenderObject
(
renderObject
);
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
// Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior
ListWheelScrollView
listWheelScrollView
=
ListWheelScrollView
();
ListWheelScrollView
listWheelScrollView
=
ListWheelScrollView
();
listWheelScrollView
=
ListWheelScrollView
(
clipToSize:
true
);
listWheelScrollView
=
ListWheelScrollView
(
clipToSize:
true
);
...
...
packages/flutter/test_fixes/material.dart.expect
View file @
252f6a02
...
@@ -303,6 +303,50 @@ void main() {
...
@@ -303,6 +303,50 @@ void main() {
renderObjectToWidgetElement.moveRenderObjectChild(renderObject, object);
renderObjectToWidgetElement.moveRenderObjectChild(renderObject, object);
renderObjectToWidgetElement.removeRenderObjectChild(renderObject);
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
// Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior
ListWheelScrollView listWheelScrollView = ListWheelScrollView();
ListWheelScrollView listWheelScrollView = ListWheelScrollView();
listWheelScrollView = ListWheelScrollView(clipBehavior: Clip.hardEdge);
listWheelScrollView = ListWheelScrollView(clipBehavior: Clip.hardEdge);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment