DataFieldParser<T> class

数据字段解析器 - 从响应的 data 字段中提取数据 适用于标准格式: { "code": 200, "data": {...}, "message": "success" }

Implemented types

Constructors

DataFieldParser({String fieldName = NetworkConstants.fieldData, bool validateStatusCode = true})

Properties

fieldName String
数据字段名,默认为 'data'
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
validateStatusCode bool
是否验证状态码,默认为 true
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse(dynamic rawData) → T
解析数据 rawData 原始响应数据 返回解析后的目标数据
override
toString() String
A string representation of this object.
inherited

Operators

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