parentToChildAnimation property
Returns an Animation used to animate the transition from the parent widget to the child widget.
Implementation
Animation<double> get parentToChildAnimation {
// Define when the animation should end.
final animationEnd = transitionWidget == null
? 0.3
: useVerticalTransition
? 0.1
: 0.2;
return Tween<double>(
begin: 0.0,
end: 1.0,
).animate(CurvedAnimation(
parent: animation,
curve: Interval(
0.0,
animationEnd,
curve: Curves.fastOutSlowIn,
),
reverseCurve: Interval(
0.0,
animationEnd,
curve: Curves.fastOutSlowIn.flipped,
),
));
}