push<T extends Object?, TO extends Object?> method

Future<T?> push<T extends Object?, TO extends Object?>({
  1. bool maintainState = true,
  2. bool fullscreenDialog = false,
  3. RoutePushStyle pushStyle = RoutePushStyle.material,
  4. RouteSettings? settings,
  5. bool replacement = false,
  6. TO? result,
})

Implementation

Future<T?> push<T extends Object?, TO extends Object?>(
    {bool maintainState = true,
    bool fullscreenDialog = false,
    RoutePushStyle pushStyle = RoutePushStyle.material,
    RouteSettings? settings,
    bool replacement = false,
    TO? result}) {
  if (replacement) {
    return pushReplacement(
        settings: settings,
        maintainState: maintainState,
        fullscreenDialog: fullscreenDialog,
        pushStyle: pushStyle,
        result: result);
  } else {
    return GlobalOptions().globalNavigatorKey.currentState!.push(
        buildPageRoute(
            maintainState: maintainState,
            fullscreenDialog: fullscreenDialog,
            settings: settings,
            pushStyle: pushStyle));
  }
}