disposeModule<T extends EasyModule> method

  1. @Deprecated('Use EasyDI.disposeModule instead')
Future<void> disposeModule<T extends EasyModule>()

Disposes a module and reloads all modules that depend on it.

This method disposes the module and then reloads all modules that depend on it. After disposing, it will:

  1. Reset the module's state and injector
  2. Re-process its imports to ensure dependencies are properly linked
  3. Recursively reload any modules that depend on this one

Example:

await ModulesManager.instance.disposeModule<UserModule>();

Throws an Exception if the module is not found in the manager.

Implementation

@Deprecated('Use EasyDI.disposeModule instead')
Future<void> disposeModule<T extends EasyModule>() async => EasyDI.disposeModule<T>();