level property

DiagnosticLevel level
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 != null) {
    if (ifPresent == null)
      return DiagnosticLevel.hidden;
  } else {
    if (ifNull == null)
      return DiagnosticLevel.hidden;
  }

  return super.level;
}