navigationPush static method

void navigationPush(
  1. BuildContext context,
  2. Widget screen, {
  3. VoidCallback? onComplete,
})

Implementation

static void navigationPush(BuildContext context, Widget screen,
    {VoidCallback? onComplete}) async {
  return await Navigator.push(
      context,
      MaterialPageRoute(
          settings: RouteSettings(name: '/${screen.toStringShort()}'),
          builder: (context) => screen)).then((value) => onComplete);
}