ServiceProvider class abstract
Defines a mechanism for retrieving a service object; that is, an object that provides custom support to other objects.
- Available extensions
Constructors
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
-
createAsyncScope(
) → AsyncDisposable -
Available on ServiceProvider, provided by the ServiceProviderServiceExtensions extension
Creates a newAsyncServiceScope
that can be used to resolve scoped services. -
createScope(
) → ServiceScope -
Available on ServiceProvider, provided by the ServiceProviderServiceExtensions extension
Creates a newServiceScope
that can be used to resolve scoped services. -
getRequiredService<
T> () → T -
Available on ServiceProvider, provided by the ServiceProviderServiceExtensions extension
Get service of typeT
from the ServiceProvider. -
getService<
T> () → T? -
getServices<
T> () → Iterable< T> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited