missing_ dependency
Details about the 'missing_dependency' diagnostic produced by the Dart analyzer.
Missing a dependency on imported {0}.
Description
#The analyzer produces this diagnostic when there's a package that has been imported in the source but is not listed as a dependency of the importing package.
Example
#
The following code produces this diagnostic because the
package path is not listed as a dependency, while
there is an import statement with package path in
the source code of package example:
name: example
dependencies:
meta: ^1.0.2
Common fixes
#
Add the missing package path to the
dependencies field:
name: example
dependencies:
meta: ^1.0.2
path: any
除非另有说明,文档之所提及适用于 Dart 3.12.2 版本报告页面问题.