registerModules static method

Future<void> registerModules(
  1. List<ZenModule> modules, {
  2. ZenScope? scope,
})

Register and load modules with auto-dependency resolution

Example:

await Zen.registerModules([
  CoreModule(),
  AuthModule(),
  ApiModule(),
]);

Implementation

static Future<void> registerModules(
  List<ZenModule> modules, {
  ZenScope? scope,
}) async {
  final targetScope = scope ?? rootScope;
  await ZenModuleRegistry.registerModules(modules, targetScope);
}