ChainResult<M, R> class

链式调用结果包装类 用于在链路中同时传递提取的对象和响应

Constructors

ChainResult({required M extracted, required Response<R> response, bool hasChainLoading = false})

Properties

extracted → M
final
hashCode int
The hash code for this object.
no setterinherited
response Response<R>
final
responseValue Response<R>
获取响应
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → M
获取提取的对象
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
thenWith<R2, E>(Future<Response<R2>> nextRequest(M extracted, Response<R> prevResponse), {E? extractor(Response<R2> response)?, M updater(M extracted, E? extractedValue)?}) Future<ChainResult<M, R2>>
继续链式调用,传递提取的对象和响应(中间步骤)
thenWithExtract<R2>(Future<Response> nextRequest(M extracted, Response<R> prevResponse), R2? finalExtractor(Response response)) Future<R2?>
继续链式调用,传递提取的对象和响应,并提取最终结果
thenWithUpdate<R2>(Future<Response> nextRequest(M extracted, Response<R> prevResponse), R2? extractor(Response response), M updater(M extracted, R2? extractedValue)) Future<M?>
继续链式调用,传递提取的对象和响应,更新对象并返回(最后一步)
toString() String
A string representation of this object.
inherited

Operators

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