mixin_super_class_constraint_non_interface
Only classes and mixins can be used as superclass constraints.
Description
#The analyzer produces this diagnostic when a type following the on
keyword in a mixin declaration is neither a class nor a mixin.
Example
#The following code produces this diagnostic because F
is neither a class
nor a mixin:
dart
typedef F = void Function();
mixin M on F {}
Common fixes
#If the type was intended to be a class but was mistyped, then replace the name.
除非另有说明,文档之所提及适用于 Dart 3.7.3 版本,本页面最后更新时间: 2025-05-08。 查看文档源码 或者 报告页面问题。