invalid_ deprecated_ implement_ annotation
The annotation '@Deprecated.implement' can only be applied to implementable classes.
Description
#
The analyzer produces this diagnostic when anything other than an
implementable class or mixin is annotated with
Deprecated.implement. An implementable
class or mixin is one not 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 {}
Unless stated otherwise, the documentation on this site reflects Dart 3.9.2. Page last updated on 2025-9-4. View source or report an issue.