@Deprecated('migration') marks a feature as deprecated.
The annotation deprecated is a shorthand for deprecating until an unspecified "next release" without migration instructions.
The intent of the
@Deprecated annotation is to inform users of a feature that they should change their code, even if it is currently still working correctly.
A deprecated feature is scheduled to be removed at a later time, possibly specified in message. A deprecated feature should not be used, code using it will break at some point in the future. If existing code is using the feature it should be rewritten to not use the deprecated feature.
A deprecated feature should document how the same effect can be achieved in message, so the programmer knows how to rewrite the code.
@Deprecated annotation applies to libraries, top-level declarations (variables, getters, setters, functions, classes and typedefs), class-level declarations (variables, getters, setters, methods, operators or constructors, whether static or not), named optional arguments and trailing optional positional parameters.
Deprecation is transitive:
A tool that processes Dart source code may report when:
If the deprecated use is inside a library, class or method which is itself deprecated, the tool should not bother the user about it. A deprecated feature is expected to use other deprecated features.
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.