LanguageUtil class

多语言 管理 @author jm

Constructors

LanguageUtil()
factory

Properties

arbDirectory Directory
getter/setter pair
arbTranslation ArbTranslation
no setter
defaultJson String
getter/setter pair
dio ↔ Dio
getter/setter pair
downedJson String
下载完的语言包内容(json)
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
languageSetting LanguageSetting
getter/setter pair
localLanguage bool
getter/setter pair
needReload bool
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tryTime int
getter/setter pair

Methods

checkAndDownload(String locale, [String? newVersion]) Future
检查并下载/更新 语言包
checkLocalLanguage() Future<bool>
检查
generateMapFromArb(String localeName) Map<String, dynamic>?
根据arb文件生成Map, value 为特定的intl message 格式
init(LanguageSetting setting) Future
生成 intl 目录,并设置LanguageSetting
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
saveArgsFromArb(String localeName, {String? contentJson}) Map<String, List<Object>>?
根据arb文件生成对应args,args为每个文案的placeholders
setLocalLanguage(bool useLocal) → void
设置是否使用本地语言
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance LanguageUtil
no setter
messages Map<String, ArbMessage?>
getter/setter pair
messagesArgs Map<String, List<Object>>?
getter/setter pair