RestApiClient class abstract

Implementers

Constructors

RestApiClient()

Properties

authHandler AuthHandler
getter/setter pair
cacheHandler CacheHandler
getter/setter pair
exceptionHandler ExceptionHandler
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addOrUpdateHeader({required String key, required String value}) → void
authorize({required String jwt, required String refreshToken}) Future<bool>
clearStorage() Future
delete<T>(String path, {dynamic data, Map<String, dynamic>? queryParameters, FutureOr<T> onSuccess(dynamic data)?, FutureOr<T> onError(dynamic data)?, RestApiClientRequestOptions? options}) Future<Result<T>>
download<T>(String urlPath, dynamic savePath, {dynamic data, Map<String, dynamic>? queryParameters, RestApiClientRequestOptions? options, ProgressCallback? onReceiveProgress, CancelToken? cancelToken, bool deleteOnError = true, String lengthHeader = Headers.contentLengthHeader, FutureOr<T> onSuccess(dynamic data)?, FutureOr<T> onError(dynamic data)?}) Future<Result<T>>
get<T>(String path, {Map<String, dynamic>? queryParameters, FutureOr<T> onSuccess(dynamic data)?, FutureOr<T> onError(dynamic data)?, RestApiClientRequestOptions? options}) Future<Result<T>>
getCached<T>(String path, {Map<String, dynamic>? queryParameters, FutureOr<T> onSuccess(dynamic data)?, FutureOr<T> onError(dynamic data)?}) Future<Result<T>>
getStreamed<T>(String path, {Map<String, dynamic>? queryParameters, FutureOr<T> onSuccess(dynamic data)?, FutureOr<T> onError(dynamic data)?, RestApiClientRequestOptions? options}) Stream<Result<T>>
init() Future<RestApiClient>
isAuthorized() Future<bool>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
patch<T>(String path, {dynamic data, Map<String, dynamic>? queryParameters, FutureOr<T> onSuccess(dynamic data)?, FutureOr<T> onError(dynamic data)?, RestApiClientRequestOptions? options}) Future<Result<T>>
post<T>(String path, {dynamic data, Map<String, dynamic>? queryParameters, FutureOr<T> onSuccess(dynamic data)?, FutureOr<T> onError(dynamic data)?, RestApiClientRequestOptions? options, bool cacheEnabled = false}) Future<Result<T>>
postCached<T>(String path, {dynamic data, Map<String, dynamic>? queryParameters, FutureOr<T> onSuccess(dynamic data)?, FutureOr<T> onError(dynamic data)?}) Future<Result<T>>
postStreamed<T>(String path, {dynamic data, Map<String, dynamic>? queryParameters, FutureOr<T> onSuccess(dynamic data)?, FutureOr<T> onError(dynamic data)?, RestApiClientRequestOptions? options}) Stream<Result<T>>
put<T>(String path, {dynamic data, Map<String, dynamic>? queryParameters, FutureOr<T> onSuccess(dynamic data)?, FutureOr<T> onError(dynamic data)?, RestApiClientRequestOptions? options}) Future<Result<T>>
setAcceptLanguageHeader(String languageCode) → void
setContentType(String contentType) → void
toString() String
A string representation of this object.
inherited
unAuthorize() Future<bool>

Operators

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

Static Methods

initFlutter() Future<void>