Deprecated.optional constructor
- String? message
Creates an annotation which deprecates omitting an argument for the annotated parameter.
The annotation can be used on optional parameters of methods, constructors, or top-level functions, indicating the parameter will be required in a later release.
Any call to a function which does not pass a value for the annotated parameter will cause a warning that such omission is deprecated.
The annotation is not inherited in method overrides.
The message, if given, is displayed as part of the warning. The message
should be aimed at the programmer who is calling the function with the
annotated parameter, 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.optional([this.message]) : _kind = _DeprecationKind.optional;