Commit 243b4c06 authored by Hans Muller's avatar Hans Muller Committed by GitHub

Ease Material route animations (#5487)

parent 03b117a5
...@@ -18,8 +18,11 @@ class _MaterialPageTransition extends AnimatedWidget { ...@@ -18,8 +18,11 @@ class _MaterialPageTransition extends AnimatedWidget {
this.child this.child
}) : super( }) : super(
key: key, 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; final Widget child;
......
...@@ -447,7 +447,7 @@ class HeroController extends NavigatorObserver { ...@@ -447,7 +447,7 @@ class HeroController extends NavigatorObserver {
if (previousRoute is PageRoute<dynamic>) // could be null if (previousRoute is PageRoute<dynamic>) // could be null
_from = previousRoute; _from = previousRoute;
_to = route; _to = route;
_animation = route.animation; _animation = new CurvedAnimation(parent: route.animation, curve: Curves.fastOutSlowIn);
_checkForHeroQuest(); _checkForHeroQuest();
} }
} }
...@@ -461,7 +461,7 @@ class HeroController extends NavigatorObserver { ...@@ -461,7 +461,7 @@ class HeroController extends NavigatorObserver {
if (previousRoute is PageRoute<dynamic>) { if (previousRoute is PageRoute<dynamic>) {
_to = previousRoute; _to = previousRoute;
_from = route; _from = route;
_animation = route.animation; _animation = new CurvedAnimation(parent: route.animation, curve: Curves.fastOutSlowIn);
_checkForHeroQuest(); _checkForHeroQuest();
} }
} }
......
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