openPopup method
Implementation
String openPopup(String routeName, Map<String,String> param) {
// Cerca il path dal RouteRegistry usando il nome
final registry = RouteRegistry();
final String? pathFromRegistry = registry.getPathByName(routeName);
if (pathFromRegistry != null) {
// Sostituisci i parametri nel path
String processedPath = pathFromRegistry;
param.forEach((key, value) {
processedPath = processedPath.replaceAll(':$key', value);
});
return processedPath;
} else {
// Fallback al comportamento originale
final fullPath = GoRouterModular.routerConfig.namedLocation(
routeName,
pathParameters: param,
);
return fullPath;
}
}