installSceneFrameFlush function

void installSceneFrameFlush()

Route the core's coalesced fx flush through the frame: post-frame callback + ensureVisualUpdate, the probed 500-writes-to-1-rebuild shape that also wakes a hidden or idle window. Idempotent; every Flutter process that hosts scene documents installs it once at startup.

Implementation

void installSceneFrameFlush() {
  sceneFlushScheduler = (flush) {
    SchedulerBinding.instance.addPostFrameCallback((_) => flush());
    SchedulerBinding.instance.ensureVisualUpdate();
  };
}