addMaterialPageRoute static method
void
addMaterialPageRoute(})
添加 MaterialPageRoute
Implementation
static void addMaterialPageRoute(
String name,
RouteWidgetBuilder builder, {
bool? maintainState = true,
bool? fullscreenDialog = false,
bool? allowSnapshotting = true,
bool? barrierDismissible = false,
}) {
RouteOptions routeOptions = RouteOptions(
builder,
MaterialPageRouteOptions(
maintainState: maintainState,
fullscreenDialog: fullscreenDialog,
allowSnapshotting: allowSnapshotting,
barrierDismissible: barrierDismissible,
));
RouterManager.routes.putIfAbsent(name, () => routeOptions);
}