Providers class

Providers are the values passed to the ProviderNodes.

Providers can be added to using either convenience functions such as provideValue or by passing in Providers.

Constructors

Providers()
Creates a new empty provider.
Providers.withProviders(Map<Type, Provider> providers, {ProviderScope scope})
Creates a provider with the included providers. [...]
factory

Properties

hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

dispose() → Future<void>
Disposes of any streams or stored values in the providers.
getFromType(Type type, {ProviderScope scope}) Provider
Provider in this case will always be of the provider type, but there is no way to make this type safe. [...]
@visibleForTesting
provide<T>(Provider<T> provider, {ProviderScope scope}) → void
Add a provider for a single type. [...]
provideAll(Map<Type, Provider> providers, {ProviderScope scope}) → void
Provide many providers at once. [...]
provideFrom(Providers other) → void
Add in all the providers from another Providers.
provideValue<T>(T value, {ProviderScope scope}) → void
Syntactic sugar around adding a value based provider. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited

Constants

defaultScope → const ProviderScope
The default scope in which any type not with a defined scope resides.
const ProviderScope('_default')