DVPageNode class

One widget in a page document.

The builder edits these; the renderer instantiates them as the real DVBox/DVText/DVImageRender widgets — the document is a serialization of the actual widget tree, not a canvas facsimile of it.

Constructors

DVPageNode({String? id, required String type, String layout = 'list', Map<String, Object?>? properties, Map<String, Object?>? action, Map<String, Map<String, Object?>>? breakpoints, List<DVPageNode>? children})
DVPageNode.box({String layout = 'list'})
factory
DVPageNode.fromJson(Map<String, Object?> json)
factory
DVPageNode.image(String src, {String? alt})
factory
DVPageNode.text(String text)
factory

Properties

action → Map<String, Object?>?
A bound action, e.g. {'type': 'navigate', 'to': '/pricing'}.
final
breakpoints → Map<String, Map<String, Object?>>
Per-breakpoint overrides of properties, keyed by DVBreakpoint name.
final
children → List<DVPageNode>
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
final
layout → String
For a box: list, row, grid, stack, or single.
final
properties → Map<String, Object?>
Widget properties: text, fontSize, padding, columns, src, alt — whatever the type consumes.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → String
box, text, or image.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
propertiesFor(DVBreakpoint breakpoint) → Map<String, Object?>
The properties in effect at breakpoint: the base, then every override from the narrowest breakpoint up to and including this one.
toJson() → Map<String, Object?>
toString() → String
A string representation of this object.
inherited
withAction(Map<String, Object?>? action) → DVPageNode
A copy with the bound action — what the action editor applies.
withBreakpointProperty(DVBreakpoint breakpoint, String name, Object? value) → DVPageNode
A copy with name overridden at breakpoint, or the override removed when value is null. A breakpoint left with no overrides is dropped.
withProperty(String name, Object? value) → DVPageNode
A copy with name set — what the property inspector applies.
withType(String type) → DVPageNode
A copy with a different node type, for palette factories that build on an existing shape.

Operators

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