hasLink method

bool hasLink(
  1. T source,
  2. T target
)

Checks if a specific link exists between two nodes

Implementation

bool hasLink(T source, T target) {
  final links = nodeLinks[source] ?? [];
  return links.any((link) => link.targetNode == target && link.isActive);
}