buildVerticalTransition method
Builds a vertical parent-child transition.
If transitionWidget isn't null the transition will start from 0.0 on
the timeline with the transitionWidget and then fade into the
childScreen
as defined by a PageTransitionChildTween.
If transitionWidget is null, an empty Container will be used as the transition widget.
Implementation
Widget buildVerticalTransition(Widget childScreen) {
return FadeTransition(
opacity: PageTransitionOpacityTween(
begin: 0.0,
end: 1.0,
).animate(CurvedAnimation(
parent: animation,
curve: Curves.fastOutSlowIn,
)),
child: PageTransitionChildTween(
// Use an empty [Container] as parent widget if there is no
// transition widget.
begin: transitionWidget ?? Container(),
end: childScreen,
)
.animate(CurvedAnimation(
parent: animation,
curve: Curves.fastOutSlowIn,
))
.value,
);
}