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
8aeef71e
Unverified
Commit
8aeef71e
authored
Jan 15, 2021
by
Kate Lovett
Committed by
GitHub
Jan 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add fixes for deprecations in TextTheme (#73994)
parent
79d0358e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
288 additions
and
0 deletions
+288
-0
fix_data.yaml
packages/flutter/lib/fix_data.yaml
+188
-0
material.dart
packages/flutter/test_fixes/material.dart
+50
-0
material.dart.expect
packages/flutter/test_fixes/material.dart.expect
+50
-0
No files found.
packages/flutter/lib/fix_data.yaml
View file @
8aeef71e
...
@@ -11,6 +11,194 @@
...
@@ -11,6 +11,194 @@
version
:
1
version
:
1
transforms
:
transforms
:
# Changes made in https://github.com/flutter/flutter/pull/48547
-
title
:
'
Renamed
to
headline1'
date
:
2020-01-24
element
:
uris
:
[
'
material.dart'
]
getter
:
display4
inClass
:
'
TextTheme'
changes
:
-
kind
:
'
rename'
newName
:
'
headline1'
# Changes made in https://github.com/flutter/flutter/pull/48547
-
title
:
'
Renamed
to
headline2'
date
:
2020-01-24
element
:
uris
:
[
'
material.dart'
]
getter
:
display3
inClass
:
'
TextTheme'
changes
:
-
kind
:
'
rename'
newName
:
'
headline2'
# Changes made in https://github.com/flutter/flutter/pull/48547
-
title
:
'
Renamed
to
headline3'
date
:
2020-01-24
element
:
uris
:
[
'
material.dart'
]
getter
:
display2
inClass
:
'
TextTheme'
changes
:
-
kind
:
'
rename'
newName
:
'
headline3'
# Changes made in https://github.com/flutter/flutter/pull/48547
-
title
:
'
Renamed
to
headline4'
date
:
2020-01-24
element
:
uris
:
[
'
material.dart'
]
getter
:
display1
inClass
:
'
TextTheme'
changes
:
-
kind
:
'
rename'
newName
:
'
headline4'
# Changes made in https://github.com/flutter/flutter/pull/48547
-
title
:
'
Renamed
to
headline5'
date
:
2020-01-24
element
:
uris
:
[
'
material.dart'
]
getter
:
headline
inClass
:
'
TextTheme'
changes
:
-
kind
:
'
rename'
newName
:
'
headline5'
# Changes made in https://github.com/flutter/flutter/pull/48547
-
title
:
'
Renamed
to
headline6'
date
:
2020-01-24
element
:
uris
:
[
'
material.dart'
]
getter
:
title
inClass
:
'
TextTheme'
changes
:
-
kind
:
'
rename'
newName
:
'
headline6'
# Changes made in https://github.com/flutter/flutter/pull/48547
-
title
:
'
Renamed
to
subtitle1'
date
:
2020-01-24
element
:
uris
:
[
'
material.dart'
]
getter
:
subhead
inClass
:
'
TextTheme'
changes
:
-
kind
:
'
rename'
newName
:
'
subtitle1'
# Changes made in https://github.com/flutter/flutter/pull/48547
-
title
:
'
Renamed
to
bodyText1'
date
:
2020-01-24
element
:
uris
:
[
'
material.dart'
]
getter
:
body2
inClass
:
'
TextTheme'
changes
:
-
kind
:
'
rename'
newName
:
'
bodyText1'
# Changes made in https://github.com/flutter/flutter/pull/48547
-
title
:
'
Renamed
to
bodyText2'
date
:
2020-01-24
element
:
uris
:
[
'
material.dart'
]
getter
:
body1
inClass
:
'
TextTheme'
changes
:
-
kind
:
'
rename'
newName
:
'
bodyText2'
# Changes made in https://github.com/flutter/flutter/pull/48547
-
title
:
'
Renamed
to
subtitle2'
date
:
2020-01-24
element
:
uris
:
[
'
material.dart'
]
getter
:
subtitle
inClass
:
'
TextTheme'
changes
:
-
kind
:
'
rename'
newName
:
'
subtitle2'
# Changes made in https://github.com/flutter/flutter/pull/48547
-
title
:
'
Rename
arguments'
date
:
2020-01-24
element
:
uris
:
[
'
material.dart'
]
constructor
:
'
'
inClass
:
'
TextTheme'
changes
:
-
kind
:
'
renameParameter'
oldName
:
'
display4'
newName
:
'
headline1'
-
kind
:
'
renameParameter'
oldName
:
'
display3'
newName
:
'
headline2'
-
kind
:
'
renameParameter'
oldName
:
'
display2'
newName
:
'
headline3'
-
kind
:
'
renameParameter'
oldName
:
'
display1'
newName
:
'
headline4'
-
kind
:
'
renameParameter'
oldName
:
'
headline'
newName
:
'
headline5'
-
kind
:
'
renameParameter'
oldName
:
'
title'
newName
:
'
headline6'
-
kind
:
'
renameParameter'
oldName
:
'
subhead'
newName
:
'
subtitle1'
-
kind
:
'
renameParameter'
oldName
:
'
subtitle'
newName
:
'
subtitle2'
-
kind
:
'
renameParameter'
oldName
:
'
body2'
newName
:
'
bodyText1'
-
kind
:
'
renameParameter'
oldName
:
'
body1'
newName
:
'
bodyText2'
# Changes made in https://github.com/flutter/flutter/pull/48547
-
title
:
'
Rename
arguments'
date
:
2020-01-24
element
:
uris
:
[
'
material.dart'
]
method
:
'
copyWith'
inClass
:
'
TextTheme'
changes
:
-
kind
:
'
renameParameter'
oldName
:
'
display4'
newName
:
'
headline1'
-
kind
:
'
renameParameter'
oldName
:
'
display3'
newName
:
'
headline2'
-
kind
:
'
renameParameter'
oldName
:
'
display2'
newName
:
'
headline3'
-
kind
:
'
renameParameter'
oldName
:
'
display1'
newName
:
'
headline4'
-
kind
:
'
renameParameter'
oldName
:
'
headline'
newName
:
'
headline5'
-
kind
:
'
renameParameter'
oldName
:
'
title'
newName
:
'
headline6'
-
kind
:
'
renameParameter'
oldName
:
'
subhead'
newName
:
'
subtitle1'
-
kind
:
'
renameParameter'
oldName
:
'
subtitle'
newName
:
'
subtitle2'
-
kind
:
'
renameParameter'
oldName
:
'
body2'
newName
:
'
bodyText1'
-
kind
:
'
renameParameter'
oldName
:
'
body1'
newName
:
'
bodyText2'
# Changes made in https://github.com/flutter/flutter/pull/66305
# Changes made in https://github.com/flutter/flutter/pull/66305
-
title
:
'
Migrate
to
clipBehavior'
-
title
:
'
Migrate
to
clipBehavior'
date
:
2020-09-22
date
:
2020-09-22
...
...
packages/flutter/test_fixes/material.dart
View file @
8aeef71e
...
@@ -26,4 +26,54 @@ void main() {
...
@@ -26,4 +26,54 @@ void main() {
buildContext
.
ancestorStateOfType
(
TypeMatcher
<
targetType
>());
buildContext
.
ancestorStateOfType
(
TypeMatcher
<
targetType
>());
buildContext
.
rootAncestorStateOfType
(
TypeMatcher
<
targetType
>());
buildContext
.
rootAncestorStateOfType
(
TypeMatcher
<
targetType
>());
buildContext
.
ancestorRenderObjectOfType
(
TypeMatcher
<
targetType
>());
buildContext
.
ancestorRenderObjectOfType
(
TypeMatcher
<
targetType
>());
// Changes made in https://github.com/flutter/flutter/pull/48547
var
TextTheme
textTheme
=
TextTheme
(
display4:
displayStyle4
,
display3:
displayStyle3
,
display2:
displayStyle2
,
display1:
displayStyle1
,
headline:
headlineStyle
,
title:
titleStyle
,
subhead:
subheadStyle
,
body2:
body2Style
,
body1:
body1Style
,
caption:
captionStyle
,
button:
buttonStyle
,
subtitle:
subtitleStyle
,
overline:
overlineStyle
,
);
// Changes made in https://github.com/flutter/flutter/pull/48547
var
TextTheme
copiedTextTheme
=
TextTheme
.
copyWith
(
display4:
displayStyle4
,
display3:
displayStyle3
,
display2:
displayStyle2
,
display1:
displayStyle1
,
headline:
headlineStyle
,
title:
titleStyle
,
subhead:
subheadStyle
,
body2:
body2Style
,
body1:
body1Style
,
caption:
captionStyle
,
button:
buttonStyle
,
subtitle:
subtitleStyle
,
overline:
overlineStyle
,
);
// Changes made in https://github.com/flutter/flutter/pull/48547
var
style
;
style
=
textTheme
.
display4
;
style
=
textTheme
.
display3
;
style
=
textTheme
.
display2
;
style
=
textTheme
.
display1
;
style
=
textTheme
.
headline
;
style
=
textTheme
.
title
;
style
=
textTheme
.
subhead
;
style
=
textTheme
.
body2
;
style
=
textTheme
.
body1
;
style
=
textTheme
.
caption
;
style
=
textTheme
.
button
;
style
=
textTheme
.
subtitle
;
style
=
textTheme
.
overline
;
}
}
packages/flutter/test_fixes/material.dart.expect
View file @
8aeef71e
...
@@ -26,4 +26,54 @@ void main() {
...
@@ -26,4 +26,54 @@ void main() {
buildContext.findAncestorStateOfType<targetType>();
buildContext.findAncestorStateOfType<targetType>();
buildContext.findRootAncestorStateOfType<targetType>();
buildContext.findRootAncestorStateOfType<targetType>();
buildContext.findAncestorRenderObjectOfType<targetType>();
buildContext.findAncestorRenderObjectOfType<targetType>();
// Changes made in https://github.com/flutter/flutter/pull/48547
var TextTheme textTheme = TextTheme(
headline1: displayStyle4,
headline2: displayStyle3,
headline3: displayStyle2,
headline4: displayStyle1,
headline5: headlineStyle,
headline6: titleStyle,
subtitle1: subheadStyle,
bodyText1: body2Style,
bodyText2: body1Style,
caption: captionStyle,
button: buttonStyle,
subtitle2: subtitleStyle,
overline: overlineStyle,
);
// Changes made in https://github.com/flutter/flutter/pull/48547
var TextTheme copiedTextTheme = TextTheme.copyWith(
headline1: displayStyle4,
headline2: displayStyle3,
headline3: displayStyle2,
headline4: displayStyle1,
headline5: headlineStyle,
headline6: titleStyle,
subtitle1: subheadStyle,
bodyText1: body2Style,
bodyText2: body1Style,
caption: captionStyle,
button: buttonStyle,
subtitle2: subtitleStyle,
overline: overlineStyle,
);
// Changes made in https://github.com/flutter/flutter/pull/48547
var style;
style = textTheme.headline1;
style = textTheme.headline2;
style = textTheme.headline3;
style = textTheme.headline4;
style = textTheme.headline5;
style = textTheme.headline6;
style = textTheme.subtitle1;
style = textTheme.bodyText1;
style = textTheme.bodyText2;
style = textTheme.caption;
style = textTheme.button;
style = textTheme.subtitle2;
style = textTheme.overline;
}
}
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