mixin_ super_ class_ constraint_ non_ interface
Details about the 'mixin_super_class_constraint_non_interface' diagnostic produced by the Dart analyzer.
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:
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.
Otherwise, remove the type from the on clause.
Unless stated otherwise, the documentation on this site reflects Dart 3.10.3. Report an issue.