NodeData class
The NodeData class in Dart represents data for a node with properties like colors, ports, node
type, name, icon, and icon color, and provides methods for JSON serialization and deserialization.
Constructors
-
NodeData(Color portColor, Color selectedPortColor, List<
Port> inputPorts, List<Port> outputPorts, Color selectedBorderColor, String nodeName, String nodeType, IconData icon, Color iconColor) -
The
NodeDataclass constructor is initializing the properties of aNodeDataobject with the values passed as arguments. Here's a breakdown of what each parameter represents: -
NodeData.fromJson(Map<
String, dynamic> json) -
The
NodeData.fromJsonfactory method parses a JSON map to create aNodeDataobject with various properties like colors, ports, node type, name, icon, and icon color.factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → IconData
-
final
- iconColor → Color
-
final
-
inputPorts
→ List<
Port> -
final
- nodeName → String
-
final
- nodeType → String
-
final
-
outputPorts
→ List<
Port> -
final
- portColor → Color
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedBorderColor → Color
-
final
- selectedPortColor → Color
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - This function converts an object to a JSON map representation.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited