getVisibleConnections method
Gets all visible connections in the graph.
A connection is visible when both its source and target nodes are visible.
Implementation
List<Connection> getVisibleConnections() {
return _connections.where((connection) {
final sourceNode = _nodes[connection.sourceNodeId];
final targetNode = _nodes[connection.targetNodeId];
return sourceNode != null &&
targetNode != null &&
sourceNode.isVisible &&
targetNode.isVisible;
}).toList();
}