before method
Parks the motion at the frame's moment.
The scene coalesces fx notifications through a scheduler the process installs — a post-frame callback under Flutter, a microtask headless — and a stage renders in a pipeline of its own that never frames and is pumped by hand. So the flush is made synchronous for exactly the span of the apply: the view hears the change now, and the pump that follows rebuilds what moved.
Implementation
@override
void before(StageFrame frame) {
var motion = this.motion;
if (motion == null) return;
var installed = sceneFlushScheduler;
sceneFlushScheduler = (flush) => flush();
try {
motion.apply(frame.at);
} finally {
sceneFlushScheduler = installed;
}
}