unregister<T extends Object> abstract method

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

Unregister an instance of an object or a factory/singleton by Type T or by name instanceName if you need to dispose any resources you can do it using disposingFunction function that provides an instance of your class to be disposed. This function overrides the disposing you might have provided when registering.

Implementation

FutureOr unregister<T extends Object>({
  Object? instance,
  String? instanceName,
  FutureOr Function(T)? disposingFunction,
});