executeIfNotScene function

void executeIfNotScene(
  1. VoidCallback? action,
  2. AliPlayerWidgetData? widgetData, [
  3. dynamic targetScenes
])

在非指定场景中执行逻辑

Execute logic in non-specified scene or scene list

Implementation

void executeIfNotScene(
  VoidCallback? action,
  AliPlayerWidgetData? widgetData, [
  dynamic targetScenes, // 支持 SceneType 或 List<SceneType>
]) {
  final scenes = _normalizeScenes(targetScenes);
  if (_shouldExecute(widgetData, scenes, false)) {
    action?.call();
  }
}