pushReplacementNamedNullable method

Future<void> pushReplacementNamedNullable(
  1. String routeName, {
  2. Object? arguments,
})

Implementation

Future<void> pushReplacementNamedNullable(String routeName,
    {Object? arguments}) async {
  if (currentContext == null) return;
  if (!currentContext!.mounted) return;
  await Navigator.of(currentContext!)
      .pushReplacementNamed(routeName, arguments: arguments);
}