AliPlayerWidgetGlobalSetting class

AliPlayer Widget Global Setting

AliPlayer Widget 全局配置

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

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

locale Locale
获取当前语言
no setter
localeNotifier ValueNotifier<Locale>
语言变化监听器
no setter
supportedLocales List<Locale>
获取支持的语言列表
no setter
systemLocale Locale?
获取系统语言
no setter

Static Methods

clearCaches() Future<void>
清除 Widget 缓存
initI18n([Locale? locale]) → void
初始化国际化
isLocaleSupported(Locale locale) bool
检查语言是否支持
overrideTranslations(String langCode, Map<String, dynamic> overrides) → void
覆盖内置翻译
registerAllTranslations(List<PlayerTranslations> translationsList) → void
批量注册外部语言包
registerTranslations(PlayerTranslations translations) → void
注册外部语言包
setLocale(Locale locale) → void
设置当前语言
setOnGlobalInit(OnGlobalInitCallback? callback) → void
注册全局初始化自定义配置回调
setStoragePaths({String? cachePath, String? filesPath}) → void
Set storage paths
setupConfig() Future<void>
Setup global configuration. Internally set, no need to call externally again.
t(String key, [Map<String, dynamic>? args]) String
获取翻译文本
updateFromSystemLocale() → void
更新为系统语言

Constants

kWidgetVersion → const String
Flutter Widget version