nonVirtual top-level constant Null safety
Used to annotate an instance member (method, getter, setter, operator, or
field) m
in a class C
or mixin M
. Indicates that m
should not be
overridden in any classes that extend or mixin C
or M
.
Tools, such as the analyzer, can provide feedback if
- the annotation is associated with anything other than an instance member,
- the annotation is associated with an abstract member (because subclasses are required to override the member),
- the annotation is associated with an extension method,
- the annotation is associated with a member
m
in classC
, and there is a classD
or mixinM
, that extends or mixes inC
, that declares an overriding memberm
.
Implementation
const _NonVirtual nonVirtual = _NonVirtual();