provide<T> function

Provider<T> provide <T>(
  1. Object token,
  2. {Type useClass,
  3. Object useValue: noValueProvided,
  4. Object useExisting,
  5. Function useFactory,
  6. List<Object> deps,
  7. bool multi}
)

Short-hand for new Provider(...).

It is strongly recommended to prefer the constructor, not this function, and to use const Provider(...) whenever possible to enable future optimizations.

Implementation

Provider<T> provide<T>(
  Object token, {
  Type useClass,
  Object useValue = noValueProvided,
  Object useExisting,
  Function useFactory,
  List<Object> deps,
  bool multi,
}) =>
    Provider<T>(
      token,
      useClass: useClass,
      useValue: useValue,
      useExisting: useExisting,
      useFactory: useFactory,
      deps: deps,
      multi: multi,
    );