toNamed function
Navigate to a named route with optional arguments.
Example:
toNamed('/details', arguments: {'id': 1});
Implementation
void toNamed(String routeName, {Map<String, dynamic>? arguments}) {
Navigator.of(Utils.navigatorKey.currentContext!)
.pushNamed(routeName, arguments: arguments);
}