Deprecated.instantiate constructor
- String? message
Creates an annotation which deprecates instantiating a class.
The annotation can be used on class declarations which can currently be
instantiated, so they are not marked abstract or sealed, but where
the ability to instantiate will be removed in a later release.
Any existing code which instantiates the annotated class will cause a warning that such use is deprecated.
The message, if given, is displayed as part of the warning. The message
should be aimed at the programmer who owns the instantiating code, and
should recommend an alternative (if available), and say when this
functionality is expected to be removed if that is sooner or later than
the next major version.
Implementation
const Deprecated.instantiate([this.message])
: _kind = _DeprecationKind.instantiate;