ResponseKeyMap class
响应 key 映射配置
用于配置后端统一响应格式中 code/msg/data 的字段名。
示例:
// 默认映射
ResponseKeyMap() // code, msg, data
// 自定义映射
ResponseKeyMap(
codeKey: 'status',
msgKey: 'message',
dataKey: 'result',
)
Constructors
- ResponseKeyMap({String codeKey = 'code', String msgKey = 'msg', String dataKey = 'data'})
-
const
-
ResponseKeyMap.fromMap(Map<
String, String> map) -
从 Map 创建
factory
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited