pushSlideBottomUp method

Future pushSlideBottomUp(
  1. Widget anotherPage
)

Implementation

Future<dynamic> pushSlideBottomUp(Widget anotherPage) {
  return Navigator.of(this).push(
    PageRouteBuilder(
      pageBuilder: (context, animation, secondaryAnimation) => anotherPage,
      transitionsBuilder: (context, animation, secondaryAnimation, child) {
        const begin = Offset(0.0, 1.0);
        const end = Offset.zero;
        const curve = Curves.ease;

        var tween = Tween(
          begin: begin,
          end: end,
        ).chain(CurveTween(curve: curve));

        return SlideTransition(
          position: animation.drive(tween),
          child: child,
        );
      },
    ),
  );
}