deprecated_implement
Implementing '{0}' is deprecated.
Description
#The analyzer produces this diagnostic when a class annotated with
@Deprecated.implement
is used in the implements
clause of a class or
enum declaration. This annotation indicates that the ability for classes
to implement the annotated class is deprecated, and will soon be removed,
perhaps by marking the annotated class with interface
, final
, or
sealed
.
Example
#If the library p
defines a class annotated with @Deprecated.implement
:
dart
@Deprecated.implement()
class C {}
Then, the following code, when in a library other than p
, produces this
diagnostic:
dart
import 'package:p/p.dart';
class D implements C {}
Common fixes
#Follow any directions found in the Deprecation.implement
annotation, or
just remove the class name from the implements
clause.
dart
class D {}