navigationReplace static method

Future navigationReplace(
  1. BuildContext context,
  2. Widget screen
)

Implementation

static Future navigationReplace(BuildContext context, Widget screen) async {
  return await Navigator.pushReplacement(
      context,
      MaterialPageRoute(
          settings: RouteSettings(name: '/${screen.toStringShort()}'),
          builder: (context) => screen));
}