factoryPut<T, A> method

void factoryPut<T, A>(
  1. _FactoryBuilderCallback<T, A> builder
)

Creates a new Instance from the <S>builder() callback.

autoRemove set this value to true when you want to remove this dependency when the route who creates this dependency is popped

onRemove callback to be called when this dependency is removed

Implementation

void factoryPut<T, A>(_FactoryBuilderCallback<T, A> builder) {
  final key = _getKey(T, null);
  _factoryVars.putIfAbsent(
    key,
    () => _Factory<T, A>(builder),
  );
}