goNext method

void goNext(
  1. String name, [
  2. Object? argument
])

Implementation

void goNext(String name, [Object? argument]) {
  navigator.routeName = name;
  if (argument == null) {
    Navigator.of(context).pushReplacementNamed(name);
  } else {
    final route =
        navigator.createRoute(RouteSettings(name: name, arguments: argument));
    Navigator.push(context, route);
  }
}