level property Null safety
override
Priority level of the diagnostic used to control which diagnostics should be shown and filtered.
The property level defaults to the value specified by the level
constructor argument. The level is raised to DiagnosticLevel.error if
an exception was thrown getting the property value. The level is
raised to DiagnosticLevel.warning if the property value is null and
the property is not allowed to be null due to missingIfNull. The
priority level is lowered to DiagnosticLevel.fine if the property
value equals defaultValue.
Implementation
@override
DiagnosticLevel get level {
if (value ?? false) {
if (ifTrue == null) {
return DiagnosticLevel.hidden;
}
}
if (value == false) {
if (ifFalse == null) {
return DiagnosticLevel.hidden;
}
}
return super.level;
}