registerCachedFactory<T extends Object> abstract method

void registerCachedFactory<T extends Object>(
  1. FactoryFunc<T> factoryFunc, {
  2. String? instanceName,
})

Like registerFactory but holds a weak reference to the last created instance if the instance wasn't garbage collected yet it will return this instance instead of creating a new one

Implementation

void registerCachedFactory<T extends Object>(
  FactoryFunc<T> factoryFunc, {
  String? instanceName,
});