t static method
获取翻译文本
Get translated text.
对外公开 API,供应用层调用。
aliplayer_widget 内部组件请使用 PlayerI18n.t()。
Public API for application layer.
Internal aliplayer_widget components should use PlayerI18n.t().
key 翻译键,支持嵌套格式(如 'player.settings.volume')
args 可选参数,用于插值替换
示例 / Example
// 基础使用 / Basic usage
final text = AliPlayerWidgetGlobalSetting.t('player.settings.volume');
// 带参数插值 / With parameter interpolation
final speedText = AliPlayerWidgetGlobalSetting.t(
'player.speed.format',
{'speed': '1.5'},
);
Implementation
static String t(String key, [Map<String, dynamic>? args]) {
return PlayerI18n.t(key, args);
}