invalid_ deprecated_ mixin_ annotation
The annotation '@Deprecated.mixin' can only be applied to classes.
Description
#The analyzer produces this diagnostic when anything other than a mixin class is annotated with Deprecated.mixin.
Example
#The following code produces this diagnostic because the annotation is on a non-mixin class:
@Deprecated.mixin()
class C {}
Common fixes
#Remove the annotation:
class C {}
Unless stated otherwise, the documentation on this site reflects Dart 3.9.2. Page last updated on 2025-9-5. View source or report an issue.