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
d9014655
Unverified
Commit
d9014655
authored
May 06, 2021
by
Jason Simmons
Committed by
GitHub
May 06, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deprecate AnimatedSize.vsync (#81067)
parent
133a55ae
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
43 deletions
+29
-43
stepper.dart
packages/flutter/lib/src/material/stepper.dart
+0
-1
text_selection_toolbar.dart
...ages/flutter/lib/src/material/text_selection_toolbar.dart
+0
-1
animated_cross_fade.dart
packages/flutter/lib/src/widgets/animated_cross_fade.dart
+0
-1
animated_size.dart
packages/flutter/lib/src/widgets/animated_size.dart
+5
-2
animated_size_test.dart
packages/flutter/test/widgets/animated_size_test.dart
+24
-38
No files found.
packages/flutter/lib/src/material/stepper.dart
View file @
d9014655
...
...
@@ -713,7 +713,6 @@ class _StepperState extends State<Stepper> with TickerProviderStateMixin {
AnimatedSize
(
curve:
Curves
.
fastOutSlowIn
,
duration:
kThemeAnimationDuration
,
vsync:
this
,
child:
widget
.
steps
[
widget
.
currentStep
].
content
,
),
_buildVerticalControls
(),
...
...
packages/flutter/lib/src/material/text_selection_toolbar.dart
View file @
d9014655
...
...
@@ -189,7 +189,6 @@ class _TextSelectionToolbarOverflowableState extends State<_TextSelectionToolbar
overflowOpen:
_overflowOpen
,
textDirection:
Directionality
.
of
(
context
),
child:
AnimatedSize
(
vsync:
this
,
// This duration was eyeballed on a Pixel 2 emulator running Android
// API 28.
duration:
const
Duration
(
milliseconds:
140
),
...
...
packages/flutter/lib/src/widgets/animated_cross_fade.dart
View file @
d9014655
...
...
@@ -366,7 +366,6 @@ class _AnimatedCrossFadeState extends State<AnimatedCrossFade> with TickerProvid
duration:
widget
.
duration
,
reverseDuration:
widget
.
reverseDuration
,
curve:
widget
.
sizeCurve
,
vsync:
this
,
child:
widget
.
layoutBuilder
(
topChild
,
topKey
,
bottomChild
,
bottomKey
),
),
);
...
...
packages/flutter/lib/src/widgets/animated_size.dart
View file @
d9014655
...
...
@@ -60,8 +60,11 @@ class AnimatedSize extends StatefulWidget {
this
.
curve
=
Curves
.
linear
,
required
this
.
duration
,
this
.
reverseDuration
,
// TODO(jsimmons): deprecate when customers tests are updated.
TickerProvider
?
vsync
,
// ignore: avoid_unused_constructor_parameters
@Deprecated
(
'This field is now ignored. '
'This feature was deprecated after v2.2.0-10.1.pre.'
)
TickerProvider
?
vsync
,
this
.
clipBehavior
=
Clip
.
hardEdge
,
})
:
assert
(
clipBehavior
!=
null
),
super
(
key:
key
);
...
...
packages/flutter/test/widgets/animated_size_test.dart
View file @
d9014655
...
...
@@ -19,11 +19,10 @@ void main() {
group
(
'AnimatedSize'
,
()
{
testWidgets
(
'animates forwards then backwards with stable-sized children'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
Center
(
const
Center
(
child:
AnimatedSize
(
duration:
const
Duration
(
milliseconds:
200
),
vsync:
tester
,
child:
const
SizedBox
(
duration:
Duration
(
milliseconds:
200
),
child:
SizedBox
(
width:
100.0
,
height:
100.0
,
),
...
...
@@ -36,11 +35,10 @@ void main() {
expect
(
box
.
size
.
height
,
equals
(
100.0
));
await
tester
.
pumpWidget
(
Center
(
const
Center
(
child:
AnimatedSize
(
duration:
const
Duration
(
milliseconds:
200
),
vsync:
tester
,
child:
const
SizedBox
(
duration:
Duration
(
milliseconds:
200
),
child:
SizedBox
(
width:
200.0
,
height:
200.0
,
),
...
...
@@ -63,11 +61,10 @@ void main() {
expect
(
box
.
size
.
height
,
equals
(
200.0
));
await
tester
.
pumpWidget
(
Center
(
const
Center
(
child:
AnimatedSize
(
duration:
const
Duration
(
milliseconds:
200
),
vsync:
tester
,
child:
const
SizedBox
(
duration:
Duration
(
milliseconds:
200
),
child:
SizedBox
(
width:
100.0
,
height:
100.0
,
),
...
...
@@ -92,14 +89,13 @@ void main() {
testWidgets
(
'clamps animated size to constraints'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
Center
(
const
Center
(
child:
SizedBox
(
width:
100.0
,
height:
100.0
,
child:
AnimatedSize
(
duration:
const
Duration
(
milliseconds:
200
),
vsync:
tester
,
child:
const
SizedBox
(
duration:
Duration
(
milliseconds:
200
),
child:
SizedBox
(
width:
100.0
,
height:
100.0
,
),
...
...
@@ -114,14 +110,13 @@ void main() {
// Attempt to animate beyond the outer SizedBox.
await
tester
.
pumpWidget
(
Center
(
const
Center
(
child:
SizedBox
(
width:
100.0
,
height:
100.0
,
child:
AnimatedSize
(
duration:
const
Duration
(
milliseconds:
200
),
vsync:
tester
,
child:
const
SizedBox
(
duration:
Duration
(
milliseconds:
200
),
child:
SizedBox
(
width:
200.0
,
height:
200.0
,
),
...
...
@@ -158,7 +153,6 @@ void main() {
Center
(
child:
AnimatedSize
(
duration:
const
Duration
(
milliseconds:
200
),
vsync:
tester
,
child:
AnimatedContainer
(
duration:
const
Duration
(
milliseconds:
100
),
width:
100.0
,
...
...
@@ -175,7 +169,6 @@ void main() {
Center
(
child:
AnimatedSize
(
duration:
const
Duration
(
milliseconds:
200
),
vsync:
tester
,
child:
AnimatedContainer
(
duration:
const
Duration
(
milliseconds:
100
),
width:
200.0
,
...
...
@@ -204,7 +197,6 @@ void main() {
Center
(
child:
AnimatedSize
(
duration:
const
Duration
(
milliseconds:
200
),
vsync:
tester
,
child:
AnimatedContainer
(
duration:
const
Duration
(
milliseconds:
1
),
width:
100.0
,
...
...
@@ -228,7 +220,6 @@ void main() {
const
Center
(
child:
AnimatedSize
(
duration:
Duration
(
milliseconds:
200
),
vsync:
TestVSync
(),
child:
SizedBox
(
width:
100.0
,
height:
100.0
,
...
...
@@ -238,11 +229,10 @@ void main() {
);
await
tester
.
pumpWidget
(
Center
(
const
Center
(
child:
AnimatedSize
(
duration:
const
Duration
(
milliseconds:
200
),
vsync:
tester
,
child:
const
SizedBox
(
duration:
Duration
(
milliseconds:
200
),
child:
SizedBox
(
width:
200.0
,
height:
100.0
,
),
...
...
@@ -258,11 +248,10 @@ void main() {
testWidgets
(
'does not run animation unnecessarily'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
Center
(
const
Center
(
child:
AnimatedSize
(
duration:
const
Duration
(
milliseconds:
200
),
vsync:
tester
,
child:
const
SizedBox
(
duration:
Duration
(
milliseconds:
200
),
child:
SizedBox
(
width:
100.0
,
height:
100.0
,
),
...
...
@@ -282,11 +271,10 @@ void main() {
testWidgets
(
'can set and update clipBehavior'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
Center
(
const
Center
(
child:
AnimatedSize
(
duration:
const
Duration
(
milliseconds:
200
),
vsync:
tester
,
child:
const
SizedBox
(
duration:
Duration
(
milliseconds:
200
),
child:
SizedBox
(
width:
100.0
,
height:
100.0
,
),
...
...
@@ -303,7 +291,6 @@ void main() {
Center
(
child:
AnimatedSize
(
duration:
const
Duration
(
milliseconds:
200
),
vsync:
tester
,
clipBehavior:
clip
,
child:
const
SizedBox
(
width:
100.0
,
...
...
@@ -327,7 +314,6 @@ void main() {
AnimatedSize
(
duration:
const
Duration
(
milliseconds:
200
),
curve:
Curves
.
easeInOutBack
,
vsync:
tester
,
child:
SizedBox
(
width:
size
.
width
,
height:
size
.
height
,
...
...
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