FrameDriver class final

The frame program for one Fleury runtime.

Constructors

FrameDriver({required TuiRuntime runtime, required TuiFrameLoop frameLoop, required FrameViewportSnapshot readViewport(), required FramePresenter presenter, FramePresentationPlanner planner = const FramePresentationPlanner(), void onBeforeFrame(String reason)?, void onLatchInput()?, void onFramePresented(TuiRenderedFrame frame, FramePresentationPlan? plan)?, void onFrameSkipped(String reason, CellSize size)?, void onBackstopError(Object error, StackTrace stack)?, void onFrameError(Object error, StackTrace stack)?, int backstopStormLimit = 8, bool isDebugWatching()?, void onPhaseTiming(Duration build, Duration layout, Duration paint)?, void markOnce(String reason)?, OutputFlowControl? flowControl, Duration frameInterval = Duration.zero, FrameFlushScheduler? flushScheduler})

Properties

backstopStormLimit → int
Consecutive backstop frames before the driver declares the session unrecoverable (an every-frame hard crash outside all boundaries).
final
hashCode → int
The hash code for this object.
no setterinherited
inFrameRender → bool
True only while the synchronous render pipeline (build/layout/paint) runs. Hosts' zone guards read it to classify a throw as a render crash versus a survivable event-handler/async error.
no setter
renderUnrecoverable → bool
True once the backstop storm limit tripped: the session cannot render. Hosts' fatal-error criteria read it.
no setter
rootElement → Element?
The mounted root element, or null before mountRoot.
no setter
runtime → TuiRuntime
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Stops scheduling. Late scheduler fires drain callbacks only.
forceFullRepaint() → void
Forces the next rendered frame to be a full repaint, WITHOUT rebuilding the root — the widget tree is unchanged; only the surface's prior content is gone.
handleResize() → void
Resets the diff base and rebuilds the root against the new viewport. The next rendered frame is a full repaint at the new size.
mountRoot(Widget rootBuilder()) → Element
Mounts the root. rootBuilder is re-invoked (and the root updated in place) on handleResize, exactly like the hosts' buildRoot() closures — the driver installs nothing inside the widget tree; hosts own their scope stack.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
renderNow(String reason) → void
Runs the frame program now — the scheduler's callback. Hosts call requestFrame; tests may call this directly for determinism.
requestFrame([String reason = 'scheduled']) → void
Coalesced frame request.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited