SceneDocument class

Inheritance
Available extensions

Constructors

SceneDocument(FrameNode root)

Properties

geometryEpoch → SceneValue<int>
Bumped when a post-frame sweep finds moved geometry, so overlays repaint without rebuilding the scene.
final
hashCode → int
The hash code for this object.
no setterinherited
listenable → Listenable

Available on SceneListenable, provided by the SceneListenableToFlutter extension

A Flutter Listenable view of this core listenable, cached per instance — hand it to AnimatedBuilder and friends.
no setter
params → List<SceneParamDecl>
The scene's declared parameters, in declaration order.
final
root → FrameNode
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tokens → List<SceneTokenDecl>
The package's shared tokens, as declared when this document was read — what a TokenRef resolves against. Storage for the read plane; a compiled scene reads its tokens formal instead.
final
tokensFormal ↔ String?
What the file calls its tokens formal, or null when it declares none. Recognised by type, so the author's own name is kept and written back.
getter/setter pair

Methods

addListener(void listener()) → void
inherited
applyArgs(Map<String, Object?> args) → void

Available on SceneDocument, provided by the SceneReadPlane extension

Instantiate: set every parameter-bound property whose parameter is named in args. This is what the export matrix does per language and what a caller's arguments do at mount — the model-level half of BannerScene(title: …).
delete(SceneNode node) → void
edit(void fn()) → void
expand(SceneNode child) → List<SceneNode>
What to draw for one child slot: the node itself, and one copy per FURTHER item when it repeats.
fxTick() → void
The probed frame-aligned flush (500 writes → 1 rebuild): coalesce all fx writes of a batch into one notification, through whatever sceneFlushScheduler the process installed.
hitDeep(double x, double y) → SceneNode?
Deepest node under the point.
hitShallow(double x, double y, {FrameNode? scope}) → SceneNode?
Topmost direct child of scope containing the point (artboard coords).
itemsOf(String param) → List<SceneItem>

Available on SceneDocument, provided by the SceneReadPlane extension

The items a repeat over param draws: the argument if one was applied, otherwise the mockup the file declares.
nodeNamed(String name) → SceneNode?
The node declared under name, or null — names are field names, so this is the resolution a motion target (scene.headline) performs.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
inherited
paramNamed(String name) → SceneParamDecl?
parentOf(SceneNode node) → FrameNode?
removeListener(void listener()) → void
inherited
reorder(SceneNode node, int newIndex) → void
restore(SceneSnapshot state) → void
Write state back into this document — the undo door's other half. Nodes are REVIVED, not replaced: a live node with the snapshot's name and kind gets the state copied into it and keeps its object identity, so fx writers (an Effect, a bound motion), widget keys and anything else holding the node keep working across an undo. Only nodes the snapshot has and the document lost come back as fresh copies.
snapshot() → SceneSnapshot
The authored plane, captured: params and the node tree, deep-copied. The fx plane is NOT part of a snapshot — it is evaluated state owned by its writers, and restoring authored values must not cancel a playing motion (the same law as Save never reading fx).
toJson() → Map<String, Object?>

Available on SceneDocument, provided by the SceneDocumentJson extension

The authored plane, complete: parameters, nodes, and what each bound property reads. Never the fx plane, which belongs to its writers.
tokenNamed(String name) → SceneTokenDecl?
toString() → String
A string representation of this object.
inherited
toWire({Iterable<String> selected = const []}) → Map<String, dynamic>
The wire the scene host renders from — data, never code, and a PICTURE rather than a document: it carries rendered values (base op fx), so a playing motion reaches the guest as a stream of these, one per flush. Selection is editor chrome riding along for hosts that outline it — the editor's, never the document's.
uniqueName(String base) → String
A fresh identifier-shaped name — names are field names in the file, so they must be unique and valid Dart identifiers from the moment a node is created, not sanitized at save time.
walk() → Iterable<(SceneNode, int)>

Operators

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