on_repeated
The type '{0}' can be included in the superclass constraints only once.
Description
#The analyzer produces this diagnostic when the same type is listed in the superclass constraints of a mixin multiple times.
Example
#The following code produces this diagnostic because A
is included twice in the superclass constraints for M
:
mixin M on A, A {
}
class A {}
class B {}
Common fixes
#If a different type should be included in the superclass constraints, then replace one of the occurrences with the other type:
mixin M on A, B {
}
class A {}
class B {}
If no other type was intended, then remove the repeated type name:
mixin M on A {
}
class A {}
class B {}
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.