ErrorMessageConfig class
错误消息配置
Constructors
-
ErrorMessageConfig({Map<
NetworkExceptionType, String> ? messages, Map<int, String> ? httpMessages, bool showDetail = false})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
httpMessages
→ Map<
int, String> -
自定义HTTP状态码错误消息映射
final
-
messages
→ Map<
NetworkExceptionType, String> -
自定义错误消息映射
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showDetail → bool
-
是否显示详细错误信息
final
Methods
-
getHttpMessage(
int statusCode) → String? - 获取HTTP错误消息
-
getMessage(
NetworkExceptionType type) → String? - 获取错误消息
-
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