SlotWidgetBuilderWithController typedef

SlotWidgetBuilderWithController = Widget Function(BuildContext context, AliPlayerWidgetController controller)

插槽构建器类型定义(带控制器)

Slot builder type definition with controller

context 构建上下文 controller 播放器控制器,用于控制播放、暂停、跳转等操作

重要说明: controller 参数确保在全屏模式下 slotBuilder 也能正确获取当前播放器控制器。 全屏模式会创建新的控制器实例,通过参数传递可以避免闭包捕获旧控制器的问题。

Important: The controller parameter ensures slotBuilders work correctly in fullscreen mode. When entering fullscreen, a new controller instance is created. By receiving the controller as a parameter, your slotBuilder will always control the correct player instance.

Implementation

typedef SlotWidgetBuilderWithController = Widget Function(
  BuildContext context,
  AliPlayerWidgetController controller,
);