UseDependency<T extends Object>.factory constructor

UseDependency<T extends Object>.factory(
  1. InstanceBuilder<T> builder, [
  2. String? id
])

Register a builder function of the T dependency with/without id as DependencyMode.factory and creates the instance if it isn't already registered, else gets its instance only.

Implementation

factory UseDependency.factory(InstanceBuilder<T> builder, [String? id]) =>
    UseDependency.create(
      builder,
      id: id,
      mode: DependencyMode.factory,
    );