addEdge method
Implementation
void addEdge(Edge edge) {
if (edges.contains(edge)) {
throw Exception('Edge already exists');
}
edges.add(edge);
}
void addEdge(Edge edge) {
if (edges.contains(edge)) {
throw Exception('Edge already exists');
}
edges.add(edge);
}