pushAndRemoveUntilAnimateFade static method

void pushAndRemoveUntilAnimateFade(
  1. BuildContext context,
  2. Widget page
)

clearPrevious pages

Implementation

static void pushAndRemoveUntilAnimateFade(BuildContext context, Widget page ) {
  var materialPageRoute = PageRouteBuilder(
      pageBuilder: (context, animation, secondaryAnimation) => page,
      transitionsBuilder : _transitionsBuilderFade,
      transitionDuration : _transitionDurationFade
  );
  Navigator.pushAndRemoveUntil(context, materialPageRoute, (e) => false);
}