to<T> method
Implementation
Future<T?> to<T>(
String path, {
Map<String, dynamic> query = const {},
bool replace = false,
Object? arguments,
}) async {
final match = _findRouteByPath(path, query: query);
if (match == null) {
throw Exception('Route not found for path: $path');
}
return _navigate<T>(match, replace: replace, arguments: arguments);
}