implements_non_class
Classes and mixins can only implement other classes and mixins.
Description
#The analyzer produces this diagnostic when a name used in the implements
clause of a class or mixin declaration is defined to be something other
than a class or mixin.
Example
#The following code produces this diagnostic because x
is a variable
rather than a class or mixin:
var x;
class C implements x {}
Common fixes
#If the name is the name of an existing class or mixin that's already being imported, then add a prefix to the import so that the local definition of the name doesn't shadow the imported name.
If the name is the name of an existing class or mixin that isn't being imported, then add an import, with a prefix, for the library in which it's declared.
除非另有说明,文档之所提及适用于 Dart 3.7.3 版本,本页面最后更新时间: 2025-05-08。 查看文档源码 或者 报告页面问题。