ModulesManager class

A singleton class responsible for initializing and managing modules.

This class handles the registration, initialization and dependency injection between modules. It maintains a map of module types to module instances and processes module imports to establish dependencies.

Annotations

Constructors

ModulesManager.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
modules UnmodifiableMapView<Type, EasyModule>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Disposes all registered modules.
disposeModule<T extends EasyModule>() Future<void>
Disposes a module and reloads all modules that depend on it.
getModule<T extends EasyModule>() → T?
Gets a module instance of type T if it exists.
initModules(List<Module> modules) Future<void>
Initializes a list of modules in a single operation.
initRegisteredModules() Future<void>
Initializes all registered modules and processes their imports.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerModule(EasyModule module) → void
Registers a single module to the initializer.
registerModules(List<EasyModule> modules) → void
Registers multiple modules to the initializer.
replace<T extends Object>(T instance, {String? key}) → void
Replaces an instance in all modules that have registered it.
replaceFromModule<TModule extends EasyModule, TInstance extends Object>(TInstance instance, {String? key}) → void
Replaces an instance in a specific module.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance ModulesManager
The singleton instance of ModulesManager.
getter/setter pair

Static Methods

reset() → void
Resets the singleton instance of ModulesManager.