pushReplaceNamed<T> static method

Future<T?> pushReplaceNamed<T>(
  1. BuildContext context,
  2. String path, {
  3. bool isDialog = false,
  4. Object? arguments,
  5. bool isRootNavigator = false,
})

Implementation

static Future<T?> pushReplaceNamed<T>(BuildContext context, String path,
    {bool isDialog = false,
    Object? arguments,
    bool isRootNavigator = false}) async {
  final T? value = await Navigator.of(context, rootNavigator: isRootNavigator)
      .pushReplacementNamed(path, arguments: arguments);
  return value;
}