pageRoute method
Implementation
@override
PageRouteBuilder pageRoute(
String name, Map<String, dynamic>? parameters, Widget page) {
var milliseconds =
_monaStyle.monaStyleAttributesModel.routeAnimationDuration ?? 1000;
switch (_monaStyle.monaStyleAttributesModel.routeBuilder) {
case PageTransitionAnimation.slideRightToLeft:
return RightToLeftRoute(
name: name,
parameters: parameters,
page: page,
milliseconds: milliseconds);
case PageTransitionAnimation.slideBottomToTop:
return BottomToTopRoute(
name: name,
parameters: parameters,
page: page,
milliseconds: milliseconds);
case PageTransitionAnimation.scaleRoute:
return ScaleRoute(
name: name,
parameters: parameters,
page: page,
milliseconds: milliseconds);
case PageTransitionAnimation.rotationRoute:
return RotationRoute(
name: name,
parameters: parameters,
page: page,
milliseconds: milliseconds);
case PageTransitionAnimation.fadeRoute:
/*
return FadeRoute(
name: name,
parameters: parameters,
page: page,
milliseconds: milliseconds);
*/
case PageTransitionAnimation.unknown:
break;
case null:
break;
}
// default
return FadeRoute(
name: name,
parameters: parameters,
page: page,
milliseconds: milliseconds);
}