Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dependency diagram in Dart/Flutter?

Tags:

Is there a way to see how packages in my flutter project depend on each other? Under packages, I mean internal packages: folders under 'lib'. Also, it would be great to check for circular dependencies between the packages.

like image 677
polina-c Avatar asked Jul 24 '19 02:07

polina-c


People also ask

How do you check dependency in flutter?

`flutter pub deps` command This command prints the dependency graph for a package. The graph includes both the immediate dependencies that the package uses (as specified in the pubspec), as well as the transitive dependencies pulled in by the immediate dependencies.

What is dependency in Dart?

A dependency is another package that your package needs in order to work. Dependencies are specified in your pubspec. You list only immediate dependencies—the software that your package uses directly. Pub handles transitive dependencies for you.

How do you add dependency in flutter project?

You can go to the pubspec. yaml file and add dependencies ,under dependencies and then packages get will do the work. or you can run flutter pub get in the terminal.


1 Answers

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

like image 106
ibhavikmakwana Avatar answered Oct 04 '22 06:10

ibhavikmakwana