push function

Future push(
  1. BuildContext context,
  2. Widget widget, {
  3. Route? route,
  4. bool? adaptive,
})

Implementation

Future<dynamic> push(BuildContext context, Widget widget,
    {Route? route, bool? adaptive}) {
  if (!isNavMounted(context)) {
    throw "Navigator is unmounted";
  }

  return Navigator.of(context)
      .push(route ?? router(context, widget, adaptive: adaptive));
}