bottomToTop static method
SlideTransition
bottomToTop(
- dynamic context,
- dynamic animation,
- dynamic secondaryAnimation,
- dynamic child,
Animation method for bottom to top
Implementation
static SlideTransition bottomToTop(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,
);
}