RequestContext class

请求上下文

承载单次请求的完整上下文信息,包括配置、状态和临时数据。

Constructors

RequestContext({required String clientKey, required SmartRequest request, List<SmartPlugin> extraPlugins = const [], Set<Type> excludePlugins = const {}, BaseOptions? optionsOverride, Map<String, dynamic>? extras})

Properties

clientKey → String
客户端 key
final
duration → int?
请求耗时(毫秒)
no setter
endTime ↔ DateTime?
请求结束时间
getter/setter pair
error ↔ Object?
错误信息(执行后填充)
getter/setter pair
excludePlugins → Set<Type>
单次请求排除的插件类型(热拔)
final
extraPlugins → List<SmartPlugin>
单次请求额外的插件列表(热插)
final
extras → Map<String, dynamic>
临时数据存储(供插件间传递)
final
hashCode → int
The hash code for this object.
no setterinherited
optionsOverride → BaseOptions?
单次请求覆盖的选项
final
request → SmartRequest
请求信息
final
response ↔ Response?
响应结果(执行后填充)
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
startTime ↔ DateTime?
请求开始时间
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