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
e0f26b44
Commit
e0f26b44
authored
Mar 16, 2017
by
Hans Muller
Committed by
GitHub
Mar 16, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a typo in AnimationController.repeat() (#8816)
parent
cefcd249
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
animation_controller.dart
packages/flutter/lib/src/animation/animation_controller.dart
+3
-3
animation_controller_test.dart
...ges/flutter/test/animation/animation_controller_test.dart
+9
-0
No files found.
packages/flutter/lib/src/animation/animation_controller.dart
View file @
e0f26b44
...
...
@@ -306,10 +306,10 @@ class AnimationController extends Animation<double>
max
??=
upperBound
;
period
??=
duration
;
assert
(()
{
if
(
duration
==
null
)
{
if
(
period
==
null
)
{
throw
new
FlutterError
(
'AnimationController.repeat() called with
no explicit Duration and
default Duration.
\n
'
'Either the "
duration
" argument to the repeat() method should be provided, or the '
'AnimationController.repeat() called with
out an explicit period and with no
default Duration.
\n
'
'Either the "
period
" argument to the repeat() method should be provided, or the '
'"duration" property should be set, either in the constructor or later, before '
'calling the repeat() function.'
);
...
...
packages/flutter/test/animation/animation_controller_test.dart
View file @
e0f26b44
...
...
@@ -277,4 +277,13 @@ void main() {
controller
.
dispose
();
expect
(
controller
.
dispose
,
throwsFlutterError
);
});
test
(
'AnimationController repeat() throws if period is not specified'
,
()
{
final
AnimationController
controller
=
new
AnimationController
(
vsync:
const
TestVSync
(),
);
expect
((){
controller
.
repeat
();
},
throwsFlutterError
);
expect
((){
controller
.
repeat
(
period:
null
);
},
throwsFlutterError
);
});
}
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