createRoute method
Creates the Route that corresponds to this page.
The created Route must have its Route.settings property set to this Page.
Implementation
@override
Route createRoute(BuildContext context) {
if (transition != null) {
return PageRouteBuilder(
opaque: !isTransparent,
settings: this,
maintainState: maintainState,
fullscreenDialog: fullscreenDialog,
pageBuilder: (context, animation, secondaryAnimation) => child!,
transitionsBuilder: (context, animation, secondaryAnimation, child) {
return transition!(animation, child);
},
);
} else {
return PageRouteBuilder(
opaque: !isTransparent,
settings: this,
maintainState: maintainState,
fullscreenDialog: fullscreenDialog,
pageBuilder: (context, animation, secondaryAnimation) => child!,
);
}
}