addParent method
Implementation
ModularRoute addParent(ModularRoute parent) {
final newName = '${parent.name}$name'.replaceFirst('//', '/');
return copyWith(
name: newName,
parent: parent.name,
middlewares: [
...parent.middlewares,
...middlewares,
],
innerModules: {
...parent.innerModules,
...innerModules,
},
);
}