CNode class abstract

CNode is the mother of all sub node classes. CNode = Custom Node. Any node in Teta is a sub class of CNode

Inheritance
Implementers
Annotations

Constructors

CNode({required String type, required NodeID? parentID, required IntrinsicState intrinsicState, required DefaultNodeAttributes defaultAttributes, required List<String> requiredAttributes, required NodeAttributes attributes, required RectProperties rectProperties, required WidgetAdapter adapter, required DateTime updatedAt, required PageID? pageID, String? name, String? description, NodeID id = '', NodeID? stabilID, CNode? child, List<CNode>? children = const [], double childOrder = 0, PageID? componentID, bool isLocked = false, bool isAppBar = false})
Constructor
const

Properties

adapter → WidgetAdapter
final
child → CNode?
The child of the node, if it exists
final
childOrder → double
The index of the node in the parent's children list
final
children → List<CNode>?
The children of the node, if they exists
final
componentID → PageID?
The component id of the node
final
constraintsEnabled → bool
no setter
description → PageID?
The description of the node
final
flipChild → bool
no setter
flipRectWhileResizing → bool
no setter
getAttributes → Map<String, dynamic>
It returns the node's attributes It merges the default attributes with the current attributes
no setter
getRectProperties → RectProperties
no setter
hashCode → int
The hash code for this object.
no setterinherited
hideHandlesWhenNotResizable → bool
no setter
horizontalAlignment → ResponsiveAlignment
no setter
id → NodeID
The id of the node (node-id)
final
intrinsicState → IntrinsicState
Intrinsic States of the node
final
isAppBar → bool
final
isLocked → bool
If the node is locked or not
final
movable → bool
no setter
name → PageID?
The name of each node
final
pageID → PageID?
The page id of the node
final
parentID → PageID?
The parent's id of the node
final
props → List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setteroverride
rectToJson → Map<String, dynamic>
Rect from Json
no setter
requiredAttributes → List<String>
final
resizable → bool
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stabilID → PageID?
Stabil id of the node
final
stringify → bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
type → NodeID
Type of the node
final
updatedAt → DateTime
final
verticalAlignment → ResponsiveAlignment
no setter

Methods

copyWith({NodeID? id, NodeID? parentID, CNode? child, List<CNode>? children, String? name, String? description, double? childOrder, Map<String, dynamic>? attributes, RectProperties? rectProperties, DateTime updatedAt, PageID? pageID, NodeID? stabilID, PageID? componentID, List<CNode>? componentChildren, bool? isLocked, List<String>? requiredAttributes}) → CNode
Copy the node with new attributes
copyWithOutChild({NodeID? id, NodeID? parentID, CNode? child, List<CNode>? children, String? name, String? description, double? childOrder, Map<String, dynamic>? attributes, RectProperties? rectProperties, DateTime updatedAt, PageID? pageID, NodeID? stabilID, PageID? componentID, List<CNode>? componentChildren, bool? isLocked, List<String>? requiredAttributes}) → CNode
Copy the node with new attributes
doesRectExist(DeviceType deviceType) → bool
getWarningAndErrors(ID nodeID, BuildContext context) → EditorWarningAndErrorsEntity
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rect(DeviceType deviceType) → Rect
rectPropertiesFromJson(Map<String, dynamic> json) → RectProperties
rectPropertiesToJson() → Map<String, dynamic>
resetRect(DeviceType deviceType) → RectProperties
setAttribute(String key, dynamic value) → CNode
setConstraintsEnabled(bool value) → void
setFlipChild(bool value) → void
setFlipRectWhileResizing(bool value) → RectProperties
setHideHandlesWhenNotResizable(bool value) → void
setHorizontalAlignment(ResponsiveAlignment value) → CNode
setMovable(bool value) → void
setRect(Rect rect, DeviceType deviceType) → RectProperties
setRectForMultipleDevices(Map<DeviceType, Rect> rectMap) → RectProperties
setResizable(bool value) → void
setVerticalAlignment(ResponsiveAlignment value) → CNode
toJson() → Map<String, dynamic>
toJson method
toJsonWithId() → Map<String, dynamic>
toJson method with id
toJsonWithIdAndPageId() → Map<String, dynamic>
toJson method with id and page id
toJsonWithStabilId() → Map<String, dynamic>
toJsonWithStabilIdAndPageIdAndId() → Map<String, dynamic>
toString() → NodeID
A string representation of this object.
toWidget({required BuildContext context, required DSWidgetState state}) → Widget
Render a Widget from node

Operators

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

Static Methods

fromJson(String widgetType, Map<String, dynamic> json) → dynamic
fromJson method
rectFromJson(Map<String, dynamic> json) → ResponsiveRect
Rect to Json