push method

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

Push a location onto the page stack.

See also:

  • replace which replaces the top-most page of the page stack but treats it as the same page. The page key will be reused. This will preserve the state and not run any page animation.

Implementation

Future<void> push(String location, {Object? extra}) => Router.of(this).push(location, extra: extra);