UseDependency<T extends Object>.factory constructor

UseDependency<T extends Object>.factory(
  1. InstanceBuilder<T> builder, {
  2. String? id,
  3. String? debugLabel,
})

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,
  String? debugLabel,
}) {
  return UseDependency.create(
    builder,
    id: id,
    mode: DependencyMode.factory,
    debugLabel: debugLabel,
  );
}