required top-level constant

Required const required

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.

Implementation

const Required required = const Required()