invalid_deprecated_mixin_annotation
Details about the 'invalid_deprecated_mixin_annotation' diagnostic produced by the Dart analyzer.
The annotation '@Deprecated.mixin' can only be applied to classes.
Description
#
The analyzer produces this diagnostic when the @Deprecated.mixin
annotation is applied to a declaration that isn't a mixin class.
Example
#The following code produces this diagnostic because the annotation is on a non-mixin class:
dart
@Deprecated.mixin()
class C {}
Common fixes
#Remove the annotation:
dart
class C {}
Was this page's content helpful?
除非另有说明,文档之所提及适用于 Dart 3.10.3 版本报告页面问题.