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.
`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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With