UiNode class
One node of the tree.
Constructors
-
UiNode({required String type, String? text, List<
UiNode> children = const [], List<UiAction> actions = const [], String? stateKey, int? flex, double? gap, double? fontSize, bool bold = false, String? align, int? columns}) -
Creates a node.
const
- UiNode.fromJson(Object? json)
-
Parses a node, rejecting unknown types.
factory
Properties
-
actions
→ List<
UiAction> -
What pressing this node does, for
button.final - align → String?
-
start,centerorend.final - bold → bool
-
Whether
textrenders bold.final -
children
→ List<
UiNode> -
Child nodes, for the layout types.
final
- columns → int?
-
Column count, for
grid.final - flex → int?
-
Flex factor inside a
roworcolumn.final - fontSize → double?
-
Font size, for
text.final - gap → double?
-
Spacing between children, for layout types.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stateKey → String?
-
State key this node writes to, for
textField.final - text → String?
-
Literal text, or a template containing
{{stateKey}}bindings.final - type → String
-
One of the supported node types; see kSupportedNodeTypes.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
kSupportedNodeTypes
→ const Set<
String> - Every type this renderer understands.