data property

Map<T, List<T>> data

Returns the underlying graph data as a map of type Map<T, List<T>>.

Implementation

Map<T, List<T>> get data {
  final data = <T, List<T>>{};
  for (final vertex in vertices) {
    if (_edges[vertex] == null) continue;
    data[vertex.data] = _edges[vertex]?.map<T>((item) => item.data)?.toList();
  }
  return data;
}