push<T> function

Future<T?> push<T>({
  1. required BuildContext context,
  2. required Widget builder(
    1. BuildContext context
    ),
  3. String? title,
  4. RouteSettings? settings,
  5. bool maintainState = true,
  6. bool fullscreenDialog = false,
  7. bool allowSnapshotting = true,
  8. bool rootNavigator = false,
})

Pushes a JadePageRoute that shows the page built by builder, like Navigator.push.

Implementation

Future<T?> push<T>({
  required BuildContext context,
  required Widget Function(BuildContext context) builder,
  String? title,
  RouteSettings? settings,
  bool maintainState = true,
  bool fullscreenDialog = false,
  bool allowSnapshotting = true,
  bool rootNavigator = false,
}) {
  return Navigator.of(context, rootNavigator: rootNavigator).push<T>(
    JadePageRoute<T>(
      builder: builder,
      title: title,
      settings: settings,
      maintainState: maintainState,
      fullscreenDialog: fullscreenDialog,
      allowSnapshotting: allowSnapshotting,
    ),
  );
}