settingsPanelRequestNotifier property
设置面板显示请求通知器
仅用于自定义 settingMenu slotBuilder 场景。
当用户通过 AliPlayerWidget.slotBuilders 自定义 SlotType.settingMenu 插槽时,
应监听此 notifier 来触发自定义面板的显示。
使用流程:
- 用户传入
slotBuilders: { SlotType.settingMenu: (ctx) => MyCustomPanel() } - 点击顶部栏设置按钮时,此 notifier 值变为
true - 自定义插槽构建器检测到此变化,显示自定义面板
- 面板关闭后,用户应将此值重置为
false
注意:
- 如果使用默认设置面板(未自定义 settingMenu),此 notifier 不会被使用
- 面板关闭后必须重置为
false,否则下次点击无法再次触发
Settings panel display request notifier.
Only used when customizing settingMenu slotBuilder.
When customizing SlotType.settingMenu via AliPlayerWidget.slotBuilders,
listen to this notifier to trigger custom panel display.
Usage flow:
- User passes
slotBuilders: { SlotType.settingMenu: (ctx) => MyCustomPanel() } - On settings button click, this notifier value becomes
true - Custom slot builder detects this change and shows custom panel
- After panel closes, user should reset this value to
false
Note:
- If using default settings panel (no custom settingMenu), this notifier is unused
- Must reset to
falseafter panel closes for subsequent clicks to trigger
Implementation
final SafeValueNotifier<bool> settingsPanelRequestNotifier =
SafeValueNotifier(false);