on_ referenced_ packages
Depend on referenced packages.
This rule is available as of Dart 2.14.0.
DO depend on referenced packages.
When importing a package, add a dependency on it to your pubspec.
Depending explicitly on packages that you reference ensures they will always exist and allows you to put a dependency constraint on them to guard you against breaking changes.
Whether this should be a regular dependency or dev_dependency depends on if it
is referenced from a public file (one under either
bin), or some
other private file.
dependencies: a: ^1.0.0
To enable the
depend_on_referenced_packages under linter > rules in your
linter: rules: - depend_on_referenced_packages