to method
Navigates to the specified route with optional args.
If a valid context and route name are provided, this method navigates to the specified route with optional args.
Implementation
void to({String? routeName, Map<String,dynamic>? args}) {
if (routeName != null) {
Navigator.pushNamed(context, routeName, arguments: args);
}
}