Provider<T> constructor

Provider<T>(
  1. T _creator(), {
  2. bool singleton = false,
})

Creates a provider with a factory function. If singleton is true, the created instance will be cached.

Implementation

Provider(this._creator, {bool singleton = false}) : _singleton = singleton;