NodeTree class
Owns the boxes built from one NodeSource, building every widget type the SDK has.
A RenderTree with the SDK's own catalog, gestures and imageLoader: the render core's tree draws only the core layout types on its own, and takes the rest from the layers above it. The boxes, views and recipes of a tree name it by RenderTree.
- Inheritance
-
- Object
- RenderTree
- NodeTree
- Available extensions
Constructors
-
NodeTree(NodeSource source, {NodeTreeObserver? observer, IslandEnvironment environment = const IslandEnvironment(), TreeBindings? binder, NodeInteractions? interactions, Map<
String, WidgetRecipe> recipes = const {}, RecipeCatalog? catalog, NodeGestures? gestures = const DragGestures(), ImageBytesLoader? imageLoader = const HttpImageLoader(), ComponentRegistry? components})
Properties
- animates → bool
-
no setterinherited
- binder ↔ NodeBinder?
-
Available on RenderTree, provided by the RenderTreeBinder extension
Applies the nodes' bindings (variables, conditions,${...}text) when set; null renders the nodes as stored. Setting it re-applies every box.getter/setter pair - bindings ↔ TreeBindings?
-
Applies the nodes' bindings (variables, conditions,
${...}text) when set; null renders the nodes as stored. Setting it re-applies every box. (The runtime'sNodeBinderis read back asbinder.)getter/setter pairinherited -
boxes
→ Iterable<
NodeBox> -
Every box of the tree.
no setterinherited
- catalog → RecipeCatalog
-
The built-in recipes by node type: every widget beyond the core layout
types. A bare RenderTree has none (it draws their boxes, at their
sizes); the SDK's
NodeTreegives its whole catalog.finalinherited - components → ComponentRegistry?
-
The component definitions calls render with (DESIGN.md §4.2): a call
node's box is its definition root's, in a ComponentInstance. Null:
a call renders as the empty box of an unknown type.
finalinherited
- dark ↔ bool
-
Whether the screen is dark (the site's theme mode, the device's
setting): the controls take the theme's dark colors. A change
re-applies the boxes that drew with the theme.
getter/setter pairinherited
- gestures → NodeGestures?
-
The gesture layers the runtime adds to its boxes (a node that follows
the pointer, drag and drop); null: none.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- imageLoader → ImageBytesLoader?
-
Fetches the images Flutter's image cache doesn't load (SVG documents)
for the render objects of this tree; null: they fetch nothing here
(such an image shows as failed unless its render object has a loader
of its own).
finalinherited
- instanceSourceCount → int
-
How many instances have their definition's source kept (one per
instance on screen).
no setterinherited
- interactions ↔ NodeInteractions?
-
Wires the nodes' reactions while the tree is interactive (a running
app); null: nodes don't react. Setting it re-applies every box.
getter/setter pairinherited
- isDisposed → bool
-
no setterinherited
- islands → IslandManager
-
The islands (widget-built nodes) of this tree.
finalinherited
- length → int
-
no setterinherited
- observer ↔ NodeTreeObserver?
-
getter/setter pairinherited
- preservingActions → bool
-
Conditional hiding retains the node: pause its screen triggers, but
let the reaction that hid it finish. Removing a view still cancels it.
no setterinherited
-
recipes
→ Map<
String, WidgetRecipe> -
The app's own recipes by node type, over the built-in ones: a type the
API doesn't declare (its props are Props.unknown), or another build
of a declared one. The core layout types (canvas, stack, box, row,
column, text, icon, spacer, variance) are always the tree's own.
finalinherited
- responsive ↔ ResponsiveWidth?
-
The screen responsive variances pick their variant for (DESIGN.md
§5.3): the project's breakpoints and the width the layout is shown at
(a running app sets it); null shows each variance's
currentvariant (a design canvas, which setscurrentitself).getter/setter pairinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- runtimeVisibility ↔ bool Function()?
-
Whether behaviors play (a running app: entrances, loops, spins) or
rest (a design canvas).
Whether the hosting route enables tickers (covered routes do not tick).
getter/setter pairinherited
- runtimeVisible → bool
-
no setterinherited
- source → NodeSource
-
finalinherited
- textDefault ↔ TextStyle?
-
The default text style of every text in the tree, under the nearest
defaultTextStyleabove a node (Flutter: theDefaultTextStylean app's theme gives its text): the theme's font family, so a text with none is drawn in it as the controls are. Null: none. A change re-applies every box.getter/setter pairinherited - theme ↔ ThemeTokens
-
The document's theme the controls draw with (over SSUI's defaults:
render/controls/tokens.dart): the component registry's theme (the
project's, as the screen shows it) when the tree has one, else the one
set here. A change re-applies the boxes that drew with it.
getter/setter pairinherited
Methods
-
boxAtPath(
String path) → NodeBox? -
The box of the node at tool path
path: call ids from the page down, then the node's id (plans/card1/cta;plans/card1is the call's box, its definition's root);<segment>#<n>picks the n-th copy (from 0) a list repeats there (faq/faqItem#2/q). The first copy when a segment has no#.inherited -
boxesAtPath(
String path) → List< NodeBox> -
Every box at tool path
pathwithout copy indexes: all the copies of a component call a list repeats (card: each copy's definition root).inherited -
boxesNamed(
String name) → List< NodeBox> -
The boxes on screen (attached and laid out) whose node is called
name: a node named in an action when its id differs per copy (each breakpoint's layout of a responsive screen has its own ids, the same names).inherited -
boxesOf(
String id) → Iterable< NodeBox> -
Every box of node
id: one per copy a list (or grid, page view...) repeats it in, and the single one of a node that doesn't repeat.inherited -
boxOf(
String id, {Object? instance}) → NodeBox? -
inherited
-
dependOnTheme(
NodeBuilder builder) → void -
Notes that
builder's node is drawn with the theme's colors: it is drawn again when the theme changes.inherited -
dispose(
) → void -
inherited
-
instanceValuesOf(
String id, Object? instance) → Map< String, Object?> -
The values set on node
idofinstance, by path.inherited -
isInstanceRoot(
String id, Object? instance) → bool -
Whether
idininstanceis the root of the definitioninstancerenders: its box is also its call's.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
obtain(
String id, Slot slot, {Object? instance}) → NodeBox -
inherited
-
orphan(
NodeBox box) → void -
boxwas taken out of its parent: unless something places it again by the end of the frame (a moved node, a list item, a node inside an island, which places its nodes while laid out), it's released.inherited -
pathOf(
String id, Object? instance) → String -
The path tools name node
idofinstanceby (plans/card1/cta).inherited -
reapply(
Iterable< String> ids) → void -
Re-applies the boxes of nodes
ids(every instance): what they show changed outside their node and the names they read (an editor changed the conditions that set them).inherited -
release(
NodeBox box) → void -
inherited
-
remeasure(
) → void -
Lays every box out again from scratch, as after an edit: what fonts
changed (a family that loaded after the first layout) is measured
again. Paragraphs inside stretched children of a hugging row/column
sit behind relayout boundaries, and islands (chips, buttons) cache the
intrinsic sizes they measured, so every render object below each box
is marked, then the hugging layouts above it.
inherited
-
resolve(
String id, {Object? instance}) → Node? -
Node
idas shown: the source's, patched by the active interaction states that style it, its bindings applied (binder).inherited -
resolveBound(
String id, {Object? instance}) → BoundNode? -
resolve, with whether a binding hides the node and what it read. The
root of a component instance is seamed with its call (bound in the
caller's scope): the call's size and placement, the root's inside.
inherited
-
resolveUnanimated(
String id, {Object? instance}) → Node? -
resolve without the values node
id's animations give it (setAnimatedValues): the value a track with nofromortostarts or ends at, and what a transition watches, are the node's own, not what the track drew last.inherited -
rootSlot(
String id) → Slot -
The slot of a node shown at the top of a view (NodeView, a drag's
feedback): it inherits the nearest
defaultTextStyleabove the node in the source, as it does where it sits (null for a top-level node).inherited -
setAnimatedValues(
String id, Map< String, Object?> values, {Object? instance}) → void -
Sets the binding paths node
id(ininstance) shows animated (valuesempty: none); its boxes re-apply, before the frame lays out.inherited -
setInstanceValue(
String id, Object? instance, String path, Object? value) → void -
Sets property
pathof nodeidininstance(a component instance, or a copy inside one) tovalue; its box re-applies.inherited -
setState(
String id, WidgetState state, bool on, {Object? instance}) → void -
Turns
stateof nodeidon or off: the nodes its state styles patch re-apply (see api.StateStyles).inherited -
sourceOf(
Object? instance) → NodeSource -
Where the ids of
instanceare: the page's source, or the definition of the innermost component instance it is in.inherited -
statesOf(
String id, {Object? instance}) → Set< WidgetState> -
The interaction states node
idis in.inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited