There are plenty of ways to represent graphs in code. They all have different advantages and disadvantages in handling node types, edge types, edge directionality, and edge data. I cover what I think are the three simplest models, Adjacency List, Edge List, and Adjacency Matrix. The video points to a repository where I (over) implemented graph representations in Dart for a programming challenge.
https://github.com/freemansoft/fs-dar... that I hope someday to get merged to dart-utils.