provide<T> function
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,
);