navigate static method
void
navigate(
Implementation
static void navigate(BuildContext context, Widget page,
{Widget? current, bool? route}) {
final p = PageTransition(
type: current is Widget
? PageTransitionType.leftToRightJoined
: PageTransitionType.leftToRight,
duration: const Duration(milliseconds: 400),
alignment: Alignment.bottomCenter,
childCurrent: current,
curve: Curves.easeInOutQuart,
child: page);
if (route is bool) {
Navigator.pushAndRemoveUntil(context, p, (route) => !route.isFirst);
} else {
Navigator.push(context, p);
}
}