Commit 99346d00 authored by Collin Jackson's avatar Collin Jackson

abarth feedback

parent a54f7cf2
...@@ -63,9 +63,11 @@ class Transition extends AnimatedComponent { ...@@ -63,9 +63,11 @@ class Transition extends AnimatedComponent {
AnimationPerformance _performance; AnimationPerformance _performance;
void initState() { void initState() {
_position = new AnimatedType<Point>(_kTransitionStartPoint) _position = new AnimatedType<Point>(
..end = Point.origin _kTransitionStartPoint,
..curve = easeOut; end: Point.origin,
curve: easeOut
);
_opacity = new AnimatedType<double>(0.0, end: 1.0) _opacity = new AnimatedType<double>(0.0, end: 1.0)
..curve = easeOut; ..curve = easeOut;
_performance = new AnimationPerformance() _performance = new AnimationPerformance()
...@@ -96,6 +98,7 @@ class Transition extends AnimatedComponent { ...@@ -96,6 +98,7 @@ class Transition extends AnimatedComponent {
direction = source.direction; direction = source.direction;
_start(); _start();
} }
interactive = source.interactive;
onDismissed = source.onDismissed; onDismissed = source.onDismissed;
super.syncFields(source); super.syncFields(source);
} }
...@@ -222,14 +225,17 @@ class Navigator extends StatefulComponent { ...@@ -222,14 +225,17 @@ class Navigator extends StatefulComponent {
if (content == null) if (content == null)
continue; continue;
String key = historyEntry.route.key; String key = historyEntry.route.key;
Transition transition = new Transition(content: content, key: key) Transition transition = new Transition(
..direction = (i <= state.historyIndex) ? TransitionDirection.forward : TransitionDirection.reverse key: key,
..interactive = (i == state.historyIndex) content: content,
..onDismissed = () { direction: (i <= state.historyIndex) ? TransitionDirection.forward : TransitionDirection.reverse,
setState(() { interactive: (i == state.historyIndex),
state.history.remove(historyEntry); onDismissed: () {
}); setState(() {
}; state.history.remove(historyEntry);
});
}
);
visibleRoutes.add(transition); visibleRoutes.add(transition);
} }
return new Stack(visibleRoutes); return new Stack(visibleRoutes);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment