OptimizedRequestInterceptor class

应用层拦截器

有缓存情况下,如果无网络/请求失败,就使用缓存

Implemented types

Constructors

OptimizedRequestInterceptor(AsyncValueGetter<bool> connectivity)

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

intercept(Chain chain) Future<Response>
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
shouldUseCacheIfServerError(Request originalRequest) Future<bool>
shouldUseCacheIfThrowError(Request originalRequest, Exception e) Future<bool>
shouldUseCacheIfWeakConnect(Request originalRequest, Exception e) Future<bool>
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited