normal property
Offset
get
normal
Returns the outward normal direction for this port position.
The normal points outward from the node boundary.
Implementation
Offset get normal {
return switch (this) {
PortPosition.left => const Offset(-1, 0),
PortPosition.right => const Offset(1, 0),
PortPosition.top => const Offset(0, -1),
PortPosition.bottom => const Offset(0, 1),
};
}