ApiProvider class abstract

The transport seam.

Everything above this interface — repositories, caching, retries, interceptors — is transport agnostic. Implement it to run requests over something other than package:http (a Dio client, a gRPC gateway, an in-memory fake for tests) and inject that implementation into RemoteRepository; nothing else in the stack has to change.

Mixed-in types
Implementers

Constructors

ApiProvider()

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 any resources the provider holds. Safe to call more than once.
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<ResponseType, InnerType>(ApiRequest<ResponseType, InnerType> request, [RequestOptions options]) Future<ApiResponse<ResponseType, InnerType>>
toString() String
A string representation of this object.
inherited

Operators

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