push<T> method

Future<T?> push<T>(
  1. Widget page, {
  2. Object? arguments,
  3. bool maintainState = true,
  4. bool fullscreenDialog = false,
  5. Transition? transition,
  6. Duration? transitionDuration,
  7. bool backGestureEnabled = false,
})

Push the given page onto the navigator.

transitionDuration will be Duration.zero when transition is equals to Transition.none

backGestureEnabled ignored when transition is equals to Transition.material or Transition.cupertino

Implementation

Future<T?> push<T>(
  Widget page, {
  Object? arguments,
  bool maintainState = true,
  bool fullscreenDialog = false,
  Transition? transition,
  Duration? transitionDuration,
  bool backGestureEnabled = false,
}) {
  _validateRouterState();
  return _navigator.push<T>(
    page,
    arguments: arguments,
    maintainState: maintainState,
    fullscreenDialog: fullscreenDialog,
    transition: transition,
    transitionDuration: transitionDuration,
    backGestureEnabled: backGestureEnabled,
  );
}