Dependency diagram in Dart/Flutter?

I was also looking for a tool to show internal dependencies but couldn't find one. So I wrote a tool called Lakos to visualize Dart/Flutter library dependencies in Graphviz. Lakos will visualize dependencies inside your project, not external package dependencies. Lakos will also warn about dependency cycles with an exit code.

https://pub.dev/packages/lakos

Example usage:

lakos --metrics . | dot -Tpng -Gdpi=200 -o lakos_example.png

The output will look similar to this:

Lakos dependency graph example


You can use below command to see your flutter app's dependency graph.

flutter pub deps

The dependency information is printed as a tree, a list, or a compact list.

enter image description here