deprecated_ instantiate
Details about the 'deprecated_instantiate' diagnostic produced by the Dart analyzer.
Instantiating '{0}' is deprecated.
Description
#
The analyzer produces this diagnostic when a class annotated
with
@Deprecated.instantiate is instantiated. This
annotation indicates that instantiating the class is
deprecated and will soon be removed. This change will likely
be enforced by marking the class as abstract or
sealed.
Example
#
If the library p defines a class annotated with
@Deprecated.instantiate:
@Deprecated.instantiate()
class C {}
Then, in any library other than p, the following
code produces this diagnostic:
import 'package:p/p.dart';
var c = C();
Common fixes
#
Follow any directions found in the
Deprecation.instantiate annotation.
除非另有说明,文档之所提及适用于 Dart 3.12.2 版本报告页面问题.