topToBottom static method
SlideTransition
topToBottom(
- dynamic context,
- dynamic animation,
- dynamic secondaryAnimation,
- dynamic child,
Animation method for top to bottom
Implementation
static SlideTransition topToBottom(context, animation, secondaryAnimation, child) {
const begin = Offset(0.0, -1.0);
const end = Offset.zero;
const curve = Curves.easeInOutSine;
final tween = Tween(begin: begin, end: end);
final curvedAnimation = CurvedAnimation(
parent: animation,
curve: curve,
);
return SlideTransition(
position: tween.animate(curvedAnimation),
child: child,
);
}