LanguageUtils class

语言切换工具类

Properties

hashCode int
The hash code for this object.
no setterinherited
languageList List<LanguageVo>
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

changeLanguage(LanguageVo language, dynamic onSuccess(Locale)) → void
切换语言
getCurrentLanguage() LanguageVo
获取当前设置的语言
getCurrentLocal() Locale
获取当前设置的语言
init(List<LanguageVo>? languageList, dynamic onSuccess(Locale), {LanguageVo? def}) → void
初始化语言 def默认语言,只有第一次初始化有用,选择了语言之后会自动加载上次选择的语言
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

Static Properties

get LanguageUtils
提供静态获取方法
no setter