Client class

Constructors

Client.new({required String baseURL, required String accessTokenKey, Map<String, dynamic>? headers, bool showLogging = true, Function? handleWhenUnauthorized, Duration? connectTimeout, Duration? receiveTimeout, List<int>? hitCacheOnErrorExcept, Duration? maxStaleCache, dynamic handleOnRequest(RequestOptions requestOptions)?, dynamic handleOnResponse(Response response)?, dynamic handleOnError(DioException err, ErrorInterceptorHandler handler)?, dynamic handleFilterLog(RequestOptions options, FilterArgs args)?, bool useCache = false})

Properties

accessTokenKey String
getter/setter pair
baseURL String
getter/setter pair
connectTimeout Duration?
getter/setter pair
dio Dio
getter/setter pair
dioService Dio
no setter
handleFilterLog ↔ dynamic Function(RequestOptions options, FilterArgs args)?
Return boolean Contoh: if(options.path.contains('/posts')){ return false; } Default Filter: return !args.isResponse || !args.hasUint8ListData;
getter/setter pair
handleOnError ↔ dynamic Function(DioException err, ErrorInterceptorHandler handler)?
getter/setter pair
handleOnRequest ↔ dynamic Function(RequestOptions requestOptions)?
getter/setter pair
handleOnResponse ↔ dynamic Function(Response response)?
getter/setter pair
handleWhenUnauthorized Function?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, dynamic>?
getter/setter pair
hitCacheOnErrorExcept List<int>?
getter/setter pair
maxStaleCache Duration?
getter/setter pair
receiveTimeout Duration?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showLogging bool
getter/setter pair
useCache bool
getter/setter pair

Methods

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