deprecated_ implement
Details about the 'deprecated_implement' diagnostic produced by the Dart analyzer.
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 to implement the
annotated class is deprecated and will soon be removed. This
change will likely be enforced by marking the class with
interface, final, or
sealed.
Example
#
If the library p defines a class annotated with
@Deprecated.implement:
@Deprecated.implement()
class C {}
Then, in any library other than p, the following
code produces this diagnostic:
import 'package:p/p.dart';
class D implements C {}
Common fixes
#
Follow any directions found in the
Deprecation.implement annotation. Otherwise,
remove the implements clause.
class D {}
除非另有说明,文档之所提及适用于 Dart 3.12.2 版本报告页面问题.