HttpApiProvider class
- Inheritance
-
- Object
- ApiProvider
- HttpApiProvider
Constructors
- HttpApiProvider({Client? client})
-
Pass a
clientto reuse connections across requests, or to substitute aMockClientfrompackage:http/testing.dartin tests. When omitted a private client is created and owned by this provider.
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
-
close(
) → void -
Releases the underlying client, unless one was injected.
override
-
formatErrorMessage(
dynamic error, String defaultErrorMessage) → ApiError -
Normalises an arbitrary throwable into an ApiError.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
send<
ResultType, InnerType> (ApiRequest< ResultType, InnerType> request, [RequestOptions options = const RequestOptions()]) → Future<ApiResponse< ResultType, InnerType> > -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited