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
dc304b42
Commit
dc304b42
authored
Aug 13, 2015
by
mpcomplete
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #592 from mpcomplete/animation.asserts
Fix common asserts in animation API.
parents
c80603cf
8a729317
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
22 deletions
+12
-22
animated_simulation.dart
packages/flutter/lib/animation/animated_simulation.dart
+2
-1
timeline.dart
packages/flutter/lib/animation/timeline.dart
+1
-1
drawer.dart
packages/flutter/lib/widgets/drawer.dart
+7
-12
popup_menu.dart
packages/flutter/lib/widgets/popup_menu.dart
+1
-6
snack_bar.dart
packages/flutter/lib/widgets/snack_bar.dart
+1
-2
No files found.
packages/flutter/lib/animation/animated_simulation.dart
View file @
dc304b42
...
...
@@ -51,7 +51,8 @@ class Ticker {
_onTick
(
timeStamp
);
if
(
isTicking
)
// The onTick callback may have scheduled another tick already.
if
(
isTicking
&&
_animationId
==
null
)
_scheduleTick
();
}
...
...
packages/flutter/lib/animation/timeline.dart
View file @
dc304b42
...
...
@@ -14,7 +14,7 @@ class TweenSimulation extends Simulation {
final
double
end
;
TweenSimulation
(
Duration
duration
,
this
.
begin
,
this
.
end
)
:
_durationInSeconds
=
duration
.
inMi
lliseconds
/
1000.0
{
_durationInSeconds
=
duration
.
inMi
croseconds
/
Duration
.
MICROSECONDS_PER_SECOND
{
assert
(
_durationInSeconds
>
0.0
);
assert
(
begin
!=
null
&&
begin
>=
0.0
&&
begin
<=
1.0
);
assert
(
end
!=
null
&&
end
>=
0.0
&&
end
<=
1.0
);
...
...
packages/flutter/lib/widgets/drawer.dart
View file @
dc304b42
...
...
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:async'
;
import
'dart:sky'
as
sky
;
import
'package:sky/animation/animated_value.dart'
;
...
...
@@ -69,9 +68,7 @@ class Drawer extends StatefulComponent {
_performance
.
attachedForce
=
kDefaultSpringForce
;
if
(
navigator
!=
null
)
{
scheduleMicrotask
(()
{
navigator
.
pushState
(
this
,
(
_
)
=>
_performance
.
reverse
());
});
navigator
.
pushState
(
this
,
(
_
)
=>
_performance
.
reverse
());
}
}
...
...
@@ -120,14 +117,12 @@ class Drawer extends StatefulComponent {
}
void
_onDismissed
()
{
scheduleMicrotask
(()
{
if
(
navigator
!=
null
&&
navigator
.
currentRoute
is
RouteState
&&
(
navigator
.
currentRoute
as
RouteState
).
owner
==
this
)
// TODO(ianh): remove cast once analyzer is cleverer
navigator
.
pop
();
if
(
onDismissed
!=
null
)
onDismissed
();
});
if
(
navigator
!=
null
&&
navigator
.
currentRoute
is
RouteState
&&
(
navigator
.
currentRoute
as
RouteState
).
owner
==
this
)
// TODO(ianh): remove cast once analyzer is cleverer
navigator
.
pop
();
if
(
onDismissed
!=
null
)
onDismissed
();
}
bool
get
_isMostlyClosed
=>
_performance
.
progress
<
0.5
;
...
...
packages/flutter/lib/widgets/popup_menu.dart
View file @
dc304b42
...
...
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:async'
;
import
'dart:sky'
as
sky
;
import
'package:sky/animation/animated_value.dart'
;
...
...
@@ -72,11 +71,7 @@ class PopupMenu extends StatefulComponent {
}
void
_open
()
{
if
(
navigator
!=
null
)
{
scheduleMicrotask
(()
{
navigator
.
pushState
(
this
,
(
_
)
=>
_close
());
});
}
navigator
.
pushState
(
this
,
(
_
)
=>
_close
());
}
void
_close
()
{
...
...
packages/flutter/lib/widgets/snack_bar.dart
View file @
dc304b42
...
...
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:async'
;
import
'package:sky/animation/animated_value.dart'
;
import
'package:sky/animation/animation_performance.dart'
;
...
...
@@ -61,7 +60,7 @@ class SnackBar extends Component {
void
_onDismissed
()
{
if
(
onDismissed
!=
null
)
scheduleMicrotask
(()
{
onDismissed
();
}
);
onDismissed
(
);
}
Widget
build
()
{
...
...
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