provide_ deprecation_ message
Details about the 'provide_deprecation_message' diagnostic produced by the Dart analyzer.
Missing a deprecation message.
Description
#
The analyzer produces this diagnostic when a
deprecated annotation is used instead of the
Deprecated annotation.
Example
#
The following code produces this diagnostic because the
function f is annotated with
deprecated:
@deprecated
void f() {}
Common fixes
#Convert the code to use the longer form:
@Deprecated('Use g instead. Will be removed in 4.0.0.')
void f() {}
除非另有说明,文档之所提及适用于 Dart 3.12.2 版本报告页面问题.