DefaultErrorLocalizer class
默认中文本地化器
为所有 SmartError 子类提供中文错误消息。 当未配置自定义本地化器时,使用此实现。
消息列表:
- TimeoutError: "连接超时" / "发送超时" / "接收超时"
- ResponseError: "服务器错误 ({statusCode})"
- Implemented types
Constructors
- DefaultErrorLocalizer()
-
创建默认中文本地化器
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
localize(
SmartError error) → String -
将 SmartError 转换为用户友好的本地化消息
override
-
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