mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Merge pull request #639 from abarth/default_enter_exit
Add a default onEnter/onExit for EnterExitTransition
This commit is contained in:
commit
97cca4d47b
@ -93,14 +93,16 @@ class _Entry {
|
||||
|
||||
typedef Widget TransitionBuilderCallback(PerformanceView performance, Widget child);
|
||||
|
||||
Widget _identityTransition(PerformanceView performance, Widget child) => child;
|
||||
|
||||
class EnterExitTransition extends StatefulComponent {
|
||||
EnterExitTransition({
|
||||
Key key,
|
||||
this.child,
|
||||
this.duration,
|
||||
this.curve: Curves.linear,
|
||||
this.onEnter,
|
||||
this.onExit
|
||||
this.onEnter: _identityTransition,
|
||||
this.onExit: _identityTransition
|
||||
}) : super(key: key) {
|
||||
assert(child != null);
|
||||
assert(duration != null);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user