-
Notifications
You must be signed in to change notification settings - Fork 127
Description
/// Used to annotate a named parameter `p` in a method or function `f`.
/// Indicates that every invocation of `f` must include an argument
/// corresponding to `p`, despite the fact that `p` would otherwise be an
/// optional parameter.
///
/// Tools, such as the analyzer, can provide feedback if
///
/// * the annotation is associated with anything other than a named parameter,
/// * the annotation is associated with a named parameter in a method `m1` that
/// overrides a method `m0` and `m0` defines a named parameter with the same
/// name that does not have this annotation, or
/// * an invocation of a method or function does not include an argument
/// corresponding to a named parameter that has this annotation.
const Required required = const Required();
This is rendered as follows (see https://pub.dartlang.org/documentation/meta/latest/meta/required-constant.html):
Used to annotate a named parameter p in a method or function f. Indicates that every invocation of f must include an argument corresponding to p, despite the fact that p would otherwise be an optional parameter.
Tools, such as the analyzer, can provide feedback if
the annotation is associated with anything other than a named parameter, the annotation is associated with a named parameter in a method m1 that overrides a method m0 and m0 defines a named parameter with the same name that does not have this annotation, or an invocation of a method or function does not include an argument corresponding to a named parameter that has this annotation.