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
a2d1d27f
Unverified
Commit
a2d1d27f
authored
May 30, 2018
by
Michael Goderbauer
Committed by
GitHub
May 30, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Keep indeterminate RefreshProgressIndicator spinning until end of time (#18010)
parent
921695cc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
2 deletions
+28
-2
progress_indicator.dart
packages/flutter/lib/src/material/progress_indicator.dart
+2
-2
progress_indicator_test.dart
packages/flutter/test/material/progress_indicator_test.dart
+26
-0
No files found.
packages/flutter/lib/src/material/progress_indicator.dart
View file @
a2d1d27f
...
...
@@ -528,8 +528,8 @@ class _RefreshProgressIndicatorState extends _CircularProgressIndicatorState {
Widget
build
(
BuildContext
context
)
{
if
(
widget
.
value
!=
null
)
_controller
.
value
=
widget
.
value
/
10.0
;
else
_controller
.
forward
();
else
if
(!
_controller
.
isAnimating
)
_controller
.
repeat
();
return
_buildAnimation
();
}
...
...
packages/flutter/test/material/progress_indicator_test.dart
View file @
a2d1d27f
...
...
@@ -206,4 +206,30 @@ void main() {
expect
(
find
.
byType
(
CircularProgressIndicator
),
paints
..
arc
(
strokeWidth:
16.0
));
});
testWidgets
(
'Indeterminate RefreshProgressIndicator keeps spinning until end of time (approximate)'
,
(
WidgetTester
tester
)
async
{
// Regression test for https://github.com/flutter/flutter/issues/13782
await
tester
.
pumpWidget
(
const
Directionality
(
textDirection:
TextDirection
.
ltr
,
child:
const
Center
(
child:
const
SizedBox
(
width:
200.0
,
child:
const
RefreshProgressIndicator
(),
),
),
),
);
expect
(
tester
.
hasRunningAnimations
,
isTrue
);
await
tester
.
pump
(
const
Duration
(
milliseconds:
6666
));
expect
(
tester
.
hasRunningAnimations
,
isTrue
);
await
tester
.
pump
(
const
Duration
(
milliseconds:
1
));
expect
(
tester
.
hasRunningAnimations
,
isTrue
);
await
tester
.
pump
(
const
Duration
(
days:
9999
));
expect
(
tester
.
hasRunningAnimations
,
isTrue
);
});
}
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