Ease Material route animations (#5487)
This commit is contained in:
@@ -18,8 +18,11 @@ class _MaterialPageTransition extends AnimatedWidget {
|
||||
this.child
|
||||
}) : super(
|
||||
key: key,
|
||||
animation: _kMaterialPageTransitionTween.animate(new CurvedAnimation(parent: animation, curve: Curves.fastOutSlowIn))
|
||||
);
|
||||
animation: _kMaterialPageTransitionTween.animate(new CurvedAnimation(
|
||||
parent: animation, // The route's linear 0.0 - 1.0 animation.
|
||||
curve: Curves.fastOutSlowIn
|
||||
)
|
||||
));
|
||||
|
||||
final Widget child;
|
||||
|
||||
|
||||
@@ -447,7 +447,7 @@ class HeroController extends NavigatorObserver {
|
||||
if (previousRoute is PageRoute<dynamic>) // could be null
|
||||
_from = previousRoute;
|
||||
_to = route;
|
||||
_animation = route.animation;
|
||||
_animation = new CurvedAnimation(parent: route.animation, curve: Curves.fastOutSlowIn);
|
||||
_checkForHeroQuest();
|
||||
}
|
||||
}
|
||||
@@ -461,7 +461,7 @@ class HeroController extends NavigatorObserver {
|
||||
if (previousRoute is PageRoute<dynamic>) {
|
||||
_to = previousRoute;
|
||||
_from = route;
|
||||
_animation = route.animation;
|
||||
_animation = new CurvedAnimation(parent: route.animation, curve: Curves.fastOutSlowIn);
|
||||
_checkForHeroQuest();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user