offNamed method
Replace the current named route with a new one.
This is similar to off, but for named routes.
Implementation
Future offNamed(String routeName, {Object? arguments, Object? result}) async =>
await
Navigator.pushReplacementNamed(context, routeName,
arguments: arguments, result: result);