SlotBuildContext class

插槽构建所需的依赖集合。 Dependencies required for building built-in slots.

持有稳定引用(Notifier 实例、Controller 实例),而非快照值。 构建函数通过 .value 读取实时数据,确保 UI 更新正确。

Holds stable references (Notifier instances, Controller instances), not snapshot values. Builder functions read real-time data via .value, ensuring correct UI updates.

在 initState 中创建一次,仅当 didUpdateWidget 检测到 Widget 参数变化时重建。

Created once in initState; only rebuilt when didUpdateWidget detects changes in Widget parameters.

Constructors

SlotBuildContext({required AliPlayerWidgetController controller, required SharedAnimationManager animationManager, Map<SlotType, Set<String>> hiddenSlotElements = const {}, VoidCallback? onBackPress})
创建 SlotBuildContext 实例。 Creates a SlotBuildContext instance.

Properties

animationManager → SharedAnimationManager
共享动画管理器,控制顶部栏与底部栏的显隐动画。 Shared animation manager that controls show/hide animations for the top bar and bottom bar.
final
controller → AliPlayerWidgetController
播放控制器,持有所有播放相关的 Notifier 和方法。 Player controller holding all playback-related notifiers and methods.
final
dragStartPosition ↔ Duration?
拖拽起始位置,由底部栏拖拽回调管理。 Drag start position, managed by bottom bar drag callbacks.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
hiddenSlotElements → Map<SlotType, Set<String>>
隐藏元素配置,控制默认插槽中单个 UI 元素的可见性。 Hidden elements configuration for controlling visibility of individual UI elements within default slots.
final
onBackPress → VoidCallback?
返回按钮回调。 Back button callback.
final
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