Commit e0f35a5f authored by Adam Barth's avatar Adam Barth

Add a default onEnter/onExit for EnterExitTransition

We now default to the identity transition.
parent 114135aa
...@@ -93,14 +93,16 @@ class _Entry { ...@@ -93,14 +93,16 @@ class _Entry {
typedef Widget TransitionBuilderCallback(PerformanceView performance, Widget child); typedef Widget TransitionBuilderCallback(PerformanceView performance, Widget child);
Widget _identityTransition(PerformanceView performance, Widget child) => child;
class EnterExitTransition extends StatefulComponent { class EnterExitTransition extends StatefulComponent {
EnterExitTransition({ EnterExitTransition({
Key key, Key key,
this.child, this.child,
this.duration, this.duration,
this.curve: Curves.linear, this.curve: Curves.linear,
this.onEnter, this.onEnter: _identityTransition,
this.onExit this.onExit: _identityTransition
}) : super(key: key) { }) : super(key: key) {
assert(child != null); assert(child != null);
assert(duration != null); assert(duration != null);
......
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