offAndToNamed<T> method

Future<T?>? offAndToNamed<T>(
  1. String page, {
  2. dynamic arguments,
  3. int? id,
  4. dynamic result,
  5. Map<String, String>? parameters,
  6. PopMode popMode = PopMode.History,
})

Implementation

Future<T?>? offAndToNamed<T>(
  String page, {
  dynamic arguments,
  int? id,
  dynamic result,
  Map<String, String>? parameters,
  PopMode popMode = PopMode.History,
}) async {
  if (parameters != null) {
    final uri = Uri(path: page, queryParameters: parameters);
    page = uri.toString();
  }

  await popRoute(result: result);
  return toNamed(page, arguments: arguments, parameters: parameters);
}