resetLazySingleton<T extends Object> method

void resetLazySingleton<T extends Object>({
  1. T? instance,
  2. String? instanceName,
  3. void disposingFunction(
    1. T
    )?,
})

Clears the instance of a lazy singleton, being able to call the factory function on the next call of get on that type again. you select the lazy Singleton you want to reset by either providing an instance, its registered type T or its registration name. if you need to dispose some resources before the reset, you can provide a disposingFunction. This function overrides the disposing you might have provided when registering.

Implementation

void resetLazySingleton<T extends Object>(
        {T? instance,
        String? instanceName,
        void Function(T)? disposingFunction}) =>
    locator.resetLazySingleton<T>(
      instance: instance,
      instanceName: instanceName,
      disposingFunction: disposingFunction,
    );