toNamed method
- @Deprecated("Avoid use this instance, you should use context.navigator.pushNamed(...)")
Do that:
Navigator.named(context, routeName, arguments: arguments);
Implementation
@Deprecated(
"Avoid use this instance, you should use context.navigator.pushNamed(...)")
Future<void> toNamed(
String routeName, {
Object? arguments,
}) async {
await Navigator.pushNamed(this, routeName, arguments: arguments);
}