What is the difference in dependencies
and dev_dependencies
in a pubspec.yaml
? It seems that when I run pub get
the
There are two types of dependencies, one is regular and the other is dev.
dependencies:
Regular dependencies are listed under dependencies:—these are packages that anyone using your package will also need.
dev_dependencies:
Dependencies that are only needed in the development phase of the package itself are listed under dev_dependencies.
If your package (say A) depends on another package (say B) (which further has dev-dependencies
), then your package (A) simply ignores the dev-dependencies
used by that package (B here).
However, your package (A) depends on the packages (which are specified under dependency
) of (B) package.