Node class

Base class of all Nodes

Constructors

Node({required String type, required Map<String, dynamic> properties, required String labelProperty, required String uniqueProperty, required String? urlProperty, NodeIcon icon = const NodeIcon()})
Node.fromJson(dynamic json)
Construct a Node from a JSON object.
factory

Properties

hashCode → int
Hash code of this Node, which is equal to hash code of the Node id.
no setteroverride
icon → NodeIcon
Node icon
final
id → String
Identifier of this Node. It's a combination of Node type and its unique property, concatenated by a dash.
no setter
label → String
Getter for label property
no setter
labelProperty → String
A property key within properties to be used as the label of the node. Mainly used for visual identification purposes.
final
properties → Map<String, dynamic>
Node properties. Keys must be string and values must be JSON serializable.
final
relatives → Future<Iterable<Tuple2<Relation, Node>>>
Relatives of this node that can be generated if/when needed. Subclasses must implement this getter, while making sure each generated Relation either starts or ends at this Node.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → String
Node type
final
uniqueProperty → String
A property key within properties that is unique for a given Node type.
final
uniqueValue → String
Getter for unique value property
no setter
url → String?
Getter for url
no setter
urlProperty → String?
A property key within properties that contains a launchable URL (web address).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → dynamic
Create JSON serializable representation of this Node.
toString() → String
Generates a string of the JSON output of this node
override

Operators

operator ==(Object other) → bool
Equality checks for Node id only
override