platformPageRoute<T> function

PageRoute<T> platformPageRoute <T>(
  1. {@required BuildContext context,
  2. @required WidgetBuilder builder,
  3. RouteSettings settings,
  4. bool maintainState: true,
  5. bool fullscreenDialog: false,
  6. String iosTitle}
)

Implementation

PageRoute<T> platformPageRoute<T>({
  @required BuildContext context,
  @required WidgetBuilder builder,
  RouteSettings settings,
  bool maintainState = true,
  bool fullscreenDialog = false,
  String iosTitle,
}) {
  if (isMaterial(context)) {
    return MaterialPageRoute<T>(
      builder: builder,
      settings: settings,
      maintainState: maintainState,
      fullscreenDialog: fullscreenDialog,
    );
  } else {
    return CupertinoPageRoute<T>(
      builder: builder,
      settings: settings,
      maintainState: maintainState,
      fullscreenDialog: fullscreenDialog,
      title: iosTitle,
    );
  }
}