addEdge static method

void addEdge(
  1. List<List<Edge?>> edges,
  2. Edge edge
)

Implementation

static void addEdge(List<List<Edge?>> edges, Edge edge) {
  final vertexIndex = edge.fromPosition + edge.characterLength;
  if (edges[vertexIndex][edge.endMode.index] == null ||
      edges[vertexIndex][edge.endMode.index]!.cachedTotalSize >
          edge.cachedTotalSize) {
    edges[vertexIndex][edge.endMode.index] = edge;
  }
}