push<T extends Object?> method

Future<T?> push<T extends Object?>(
  1. String location, {
  2. Object? extra,
})

Push a location onto the page stack.

Implementation

Future<T?> push<T extends Object?>(String location, {Object? extra}) async {
  T? result;
  final router = App.goRouter;
  if (router == null) {
    result = await Navigator.pushNamed<T>(this, location, arguments: extra);
  } else {
    result = await router.push<T>(location, extra: extra);
  }
  return result;
}