getNodeIndex method

int getNodeIndex(
  1. String nodeId
)

Get the index of a node by its ID

Implementation

int getNodeIndex(String nodeId) {
  return nodes.indexWhere((node) => node.id == nodeId);
}