showSettingsPanel static method
Future<void>
showSettingsPanel({
- required BuildContext context,
- required AliPlayerWidgetController controller,
- required SceneType sceneType,
- required SafeValueNotifier<
bool> isShowExternalSubtitle,
显示设置面板(自动根据 orientation 选择横竖屏样式)
context 构建上下文
controller 播放器控制器,用于获取状态和控制播放器
sceneType 播放场景类型,用于过滤不适用的设置项
hiddenSlotElements 需要隐藏的元素配置
isShowExternalSubtitle 外挂字幕显示状态 notifier
Implementation
static Future<void> showSettingsPanel({
required BuildContext context,
required AliPlayerWidgetController controller,
required SceneType sceneType,
required Map<SlotType, Set<String>>? hiddenSlotElements,
required SafeValueNotifier<bool> isShowExternalSubtitle,
}) {
final orientation = MediaQuery.of(context).orientation;
if (orientation == Orientation.portrait) {
return _showPortraitPanel(
context: context,
controller: controller,
sceneType: sceneType,
hiddenSlotElements: hiddenSlotElements,
isShowExternalSubtitle: isShowExternalSubtitle,
);
} else {
return _showLandscapePanel(
context: context,
controller: controller,
sceneType: sceneType,
hiddenSlotElements: hiddenSlotElements,
isShowExternalSubtitle: isShowExternalSubtitle,
);
}
}