invalid_ deprecated_ implement_ annotation
Details about the 'invalid_deprecated_implement_annotation' diagnostic produced by the Dart analyzer.
The annotation '@Deprecated.implement' can only be applied to implementable classes.
Description
#
The analyzer produces this diagnostic when the
@Deprecated.implement
annotation is applied to a declaration that isn't an
implementable class or mixin. An implementable class or mixin
is one that isn't declared with the base, final, or sealed
keywords.
Example
#The following code produces this diagnostic because the annotation is on a sealed class:
@Deprecated.implement()
sealed class C {}
Common fixes
#Remove the annotation:
sealed class C {}
除非另有说明,文档之所提及适用于 Dart 3.12.2 版本报告页面问题.