navigateAndRestore method

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

Implementation

navigateAndRestore({required Widget screen, onBack, bool fade = false}) =>
    Navigator.of(this)
        .push(fade
            ? _fadeTransition(screen)
            : MaterialPageRoute(builder: (_) => screen))
        .then((val) {});