Provider class abstract

The Provider class is used to define a provider.

Implementers

Constructors

Provider()
The Provider constructor is used to create a new instance of the Provider class.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

composed<T extends Provider>(Future<T> init(CompositionContext context), {required List<Type> inject}) ComposedProvider<T>
The factory constructor Provider.composed is used to create a new instance of the Provider class with dependencies. It uses the ComposedProvider class to define a provider that is initialized asynchronously.
forClass<T extends Provider>({required T useClass}) ClassProvider<T>
Creates a ClassProvider that registers useClass under the token T.
forValue<T>(T value, {String? name, Type? asType}) ValueProvider<T>
Creates a ValueProvider that registers value under the type T.