getAllVertices method

  1. @override
List<Vertex> getAllVertices()
override

Returns a list of all vertices in graph.

Implementation

@override
List<Vertex> getAllVertices() {
  List<Vertex> vertexList = [];
  for (var element in graph.keys) {
    vertexList.add(element);
  }
  return vertexList;
}