mixin_ application_ not_ implemented_ interface
'{0}' can't be mixed onto '{1}' because '{1}' doesn't implement '{2}'.
Description
#The analyzer produces this diagnostic when a mixin that has a superclass constraint is used in a mixin application with a superclass that doesn't implement the required constraint.
Example
#
The following code produces this diagnostic because the mixin
M
requires
that the class to which it's applied be a subclass of
A
, but
Object
isn't a subclass of
A
:
class A {}
mixin M on A {}
class X = Object with M;
Common fixes
#If you need to use the mixin, then change the superclass to be either the same as or a subclass of the superclass constraint:
class A {}
mixin M on A {}
class X = A with M;
Unless stated otherwise, the documentation on this site reflects Dart 3.9.2. Page last updated on 2025-9-1. View source or report an issue.