TCICTextReplace class

按界面显示值覆盖字符串,按语言分别传入。 key 为界面实际显示的原始文本,value 为替换文本。 采用完整字符串精确匹配(非子串替换)。

示例:

TCICConfig(
  textReplace: TCICTextReplace(
    zhTw: {'取消': '關閉', '開啟': '確認'},
  ),
)

Constructors

TCICTextReplace({Map<String, String>? zh, Map<String, String>? en, Map<String, String>? ja, Map<String, String>? ko, Map<String, String>? zhTw})
const

Properties

en Map<String, String>?
final
hashCode int
The hash code for this object.
no setterinherited
ja Map<String, String>?
final
ko Map<String, String>?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
zh Map<String, String>?
final
zhTw Map<String, String>?
final

Methods

mapForLang(String langCode) Map<String, String>?
根据语言代码返回对应的替换 Map(不存在时返回 null)。
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

fromJson(Map<String, dynamic> json) TCICTextReplace