navigateAndRemoveUntil method

dynamic navigateAndRemoveUntil({
  1. required Widget screen,
  2. bool fade = false,
})

Implementation

navigateAndRemoveUntil({required Widget screen, bool fade = false}) =>
    Navigator.of(this).pushAndRemoveUntil(
        fade
            ? _fadeTransition(screen)
            : MaterialPageRoute(builder: (_) => screen),
        (Route<dynamic> route) => false);