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
:
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.
If the name is wrong, then change it to one of the names that's declared in the imported libraries.
Unless stated otherwise, the documentation on this site reflects Dart 3.7.3. Page last updated on 2025-05-08. View source or report an issue.