Dependency<T> constructor

const Dependency<T>(
  1. T factory(
    1. Dependencies scope
    ), {
  2. List<Type> dependsOn = const [],
})

Creates a Dependency with the given factory and dependencies.

  • factory: A callback function that creates an instance of type T.
  • dependsOn: (Optional) A list of types that the factory depends on.

Implementation

const Dependency(this.factory, {this.dependsOn = const []});