mustCallSuper top-level constant

_MustCallSuper const mustCallSuper

Used to annotate an instance member (method, getter, setter, operator, or field) m. Indicates that every invocation of a member that overrides m must also invoke m. In addition, every method that overrides m is implicitly annotated with this same annotation.

Note that private members with this annotation cannot be validly overridden outside of the library that defines the annotated member.

Tools, such as the analyzer, can provide feedback if

  • the annotation is associated with anything other than an instance member, or
  • a member that overrides a member that has this annotation can return without invoking the overridden member.

Implementation

const _MustCallSuper mustCallSuper = _MustCallSuper();