toNamedRouteWithArgs method
Navigates to a named route with specified args.
If a valid BuildContext is provided, this method navigates to the specified route with optional args.
Implementation
void toNamedRouteWithArgs({String? routeName, Map<String,dynamic>? args}) {
Navigator.pushNamed(
context,
routeName!,
arguments: args,
);
}