undefined_prefixed_name
The name '{0}' is being referenced through the prefix '{1}', but it isn't defined in any of the libraries imported using that prefix.
Description
#The analyzer produces this diagnostic when a prefixed identifier is found where the prefix is valid, but the identifier isn't declared in any of the libraries imported using that prefix.
Example
#The following code produces this diagnostic because dart:core
doesn't
define anything named a
:
dart
import 'dart:core' as p;
void f() {
p.a;
}
Common fixes
#If the library in which the name is declared isn't imported yet, add an import for the library.
除非另有说明,文档之所提及适用于 Dart 3.7.3 版本,本页面最后更新时间: 2025-05-08。 查看文档源码 或者 报告页面问题。