find method
Finds a registered route by its name.
Throws an Exception if the route is not found.
Implementation
SafeRoute<Object?, Object?>? find(String? name) {
if (name == null) throw Exception('Route name is null');
final route = _routes[name];
if (route == null) throw Exception('Route not found: $name');
return _routes[name] as SafeRoute<Object?, Object?>?;
}