registerCachedFactoryParam<T extends Object, P1, P2> abstract method

void registerCachedFactoryParam<T extends Object, P1, P2>(
  1. FactoryFuncParam<T, P1, P2> factoryFunc, {
  2. String? instanceName,
})

Like registerFactoryParam but holds a weak reference to the last created instance if the instance wasn't garbage collected yet, and if the passed parameter haven't changed, it will return this instance instead of creating a new one

Implementation

void registerCachedFactoryParam<T extends Object, P1, P2>(
  FactoryFuncParam<T, P1, P2> factoryFunc, {
  String? instanceName,
});