pushAndRemoveUntilAnimateFade static method
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);
}