addModule method
Implementation
@visibleForTesting
Map<ModularKey, ModularRoute> addModule(ModularRoute route) {
final Map<ModularKey, ModularRoute> map = {};
final module = route.context!;
modules.add(module);
for (var child in module.routes) {
child = child.copyWith(
bindContextEntries: {module.runtimeType: module},
parent: route.parent);
child = copy(route, child);
map.addAll(assembleRoute(child));
}
return map;
}