LangManager class
Constructors
- LangManager()
-
factory
Properties
- currentLang → LangEntry?
-
no setter
- defaultLang → LangEntry?
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
langPackage
→ Future<
Map< String, dynamic> > -
获取语言资源包
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
supportedLocale
→ List<
Locale> -
no setter
-
supportLang
→ Map<
String, LangEntry> -
no setter
Methods
-
addChangeState(
int hashCode, OnLangChangeState langState) → void -
bindCurrentLocale(
Locale locale) → void - endregion region 绑定本地语言
-
currentLocale(
Locale locale) → Locale? -
getLangData(
) → Future< String> - endregion 获取语言数据
-
incrementalUpdate(
Map< String, dynamic> langMap) → void - 增量更新
-
isSupported(
Locale deviceLocale) → bool -
判断本地语言是否支持
deviceLocale
当前设备语言supportedLocals
设置的语言 -
langConfig(
) → OnLangConfig? - endregion region 获取语言配置对象
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyAll(
Locale? locale) → void - region 切换本地化语言
-
registerConfig<
T extends OnLangConfig> (T? config) → void -
config
OnLangConfig实现类 -
removeChangeState(
int hashCode) → void -
syncTextsData(
{required dynamic complete()}) → void - 同步文案数据 1.如果本地缓存不存在则从assets中读取; 2.本地版本小于请求版本时增量更新语言配置;
-
toString(
) → String -
A string representation of this object.
inherited
-
value(
String key) → String -
endregion
key
语言关键信息key
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → LangManager
-
no setter