NodeInfo class

Represents information about a specific SVG node within an SVG.

The NodeInfo class holds the identifier of a node along with its position or coordinate information, as described by a NodeCoordinate.

This class is used by the JujubaCommander to trigger commands in a specific SVG region or node.

Example:

final node = NodeInfo(
  id: 'circle_1',
  coordinate: NodeCoordinate(x: 10, y: 20),
);

print(node.id); // circle_1
print(node.coordinate.x); // 10

See also:

  • NodeCoordinate, which defines the position or transformation of a node.

Constructors

NodeInfo({required String id, required NodeCoordinate coordinate})
Creates a new immutable NodeInfo with the given id and coordinate.
const

Properties

coordinate NodeCoordinate
Describes where the node is located within the SVG coordinate space.
final
hashCode int
The hash code for this object.
no setterinherited
id String
The unique identifier of the node.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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