executeIfNotSceneType function

void executeIfNotSceneType(
  1. VoidCallback? action,
  2. SceneType? currentScene, [
  3. dynamic targetScenes
])

直接通过 SceneType 在非指定场景中执行逻辑

Execute logic in non-specified scene using SceneType directly

Implementation

void executeIfNotSceneType(
  VoidCallback? action,
  SceneType? currentScene, [
  dynamic targetScenes, // 支持 SceneType 或 List<SceneType>
]) {
  if (isNotSceneType(currentScene, targetScenes)) {
    action?.call();
  }
}