buildPageRoute<T> method

PageRoute<T> buildPageRoute<T>(
  1. Widget widget
)

Builds the primary contents of the route.

Implementation

PageRoute<T> buildPageRoute<T>(Widget widget) {
  switch (style) {
    case RoutePushStyle.cupertino:
      return CupertinoPageRoute<T>(
          title: title,
          settings: settings,
          maintainState: maintainState,
          fullscreenDialog: fullscreenDialog,
          barrierDismissible: barrierDismissible,
          allowSnapshotting: allowSnapshotting,
          builder: builder ?? widget.toWidgetBuilder);
    case RoutePushStyle.material:
      return MaterialPageRoute<T>(
          settings: settings,
          maintainState: maintainState,
          fullscreenDialog: fullscreenDialog,
          barrierDismissible: barrierDismissible,
          allowSnapshotting: allowSnapshotting,
          builder: builder ?? widget.toWidgetBuilder);
  }
}