KLanguageUtils class

语言切换工具类

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

changeLanguage(String languageName, dynamic onSuccess(Locale, LanguageVo), {LanguageVo? def}) → void
切换语言,如果是跟随系统,多语言下需要手动设置显示文案
getCurrentLanguage() LanguageVo
获取当前语言
getCurrentLocal({LanguageVo? def}) Locale
获取当前语言的local
getLanguageList() List<LanguageVo>
获取配置的语言列表
initLanguage(List<LanguageVo> languages) → void
初始化语言
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
updateStrSystem() → void
语言切换的时候更新文案

Operators

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

Static Properties

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