RenderTree class
Owns the boxes built from one NodeSource.
- Implementers
- Available extensions
Constructors
-
RenderTree(NodeSource source, {NodeTreeObserver? observer, IslandEnvironment environment = const IslandEnvironment(), TreeBindings? binder, NodeInteractions? interactions, Map<
String, WidgetRecipe> recipes = const {}, RecipeCatalog catalog = RecipeCatalog.none, NodeGestures? gestures, ImageBytesLoader? imageLoader, ComponentRegistry? components})
Properties
- animates → bool
-
no setter
- 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 pair -
boxes
→ Iterable<
NodeBox> -
Every box of the tree.
no setter
- 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.final - 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.
final
- 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 pair
- gestures → NodeGestures?
-
The gesture layers the runtime adds to its boxes (a node that follows
the pointer, drag and drop); null: none.
final
- 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).
final
- instanceSourceCount → int
-
How many instances have their definition's source kept (one per
instance on screen).
no setter
- 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 pair
- isDisposed → bool
-
no setter
- islands → IslandManager
-
The islands (widget-built nodes) of this tree.
final
- length → int
-
no setter
- observer ↔ NodeTreeObserver?
-
getter/setter pair
- 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 setter
-
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.
final
- 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 pair - 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 pair
- runtimeVisible → bool
-
no setter
- source → NodeSource
-
final
- 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 pair - 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 pair
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#. -
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). -
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). -
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. -
boxOf(
String id, {Object? instance}) → NodeBox? -
dependOnTheme(
NodeBuilder builder) → void -
Notes that
builder's node is drawn with the theme's colors: it is drawn again when the theme changes. -
dispose(
) → void -
instanceValuesOf(
String id, Object? instance) → Map< String, Object?> -
The values set on node
idofinstance, by path. -
isInstanceRoot(
String id, Object? instance) → bool -
Whether
idininstanceis the root of the definitioninstancerenders: its box is also its call's. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
obtain(
String id, Slot slot, {Object? instance}) → NodeBox -
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. -
pathOf(
String id, Object? instance) → String -
The path tools name node
idofinstanceby (plans/card1/cta). -
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). -
release(
NodeBox box) → void -
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.
-
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). -
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.
-
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. -
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). -
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. -
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. -
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). -
sourceOf(
Object? instance) → NodeSource -
Where the ids of
instanceare: the page's source, or the definition of the innermost component instance it is in. -
statesOf(
String id, {Object? instance}) → Set< WidgetState> -
The interaction states node
idis in. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
live
→ Iterable<
RenderTree> -
The trees showing now, the latest first: an action in an overlay that
names a node of the page under it (a menu's
scrollTo) finds it there.no setter
Static Methods
-
keyOf(
String id, Object? instance) → String -
The key of node
id's box ininstance(null: outside repeats). -
withoutBindsUnder(
Node n, Map< String, Object?> patch) → Node -
nwithout the bindingspatch(an active state's) sets: a hovered fill wins over the bound one while it's hovered, as a state's style overrides the node's.