DiagnosticLevel enum
The various priority levels used to filter which diagnostics are shown and omitted.
Trees of Flutter diagnostics can be very large so filtering the diagnostics shown matters. Typically filtering to only show diagnostics with at least level debug is appropriate.
In release mode, this level may not have any effect, as diagnostics in release mode are compacted or truncated to reduce binary size.
Values
-
Diagnostics that should not be shown.
If a user chooses to display hidden diagnostics, they should not expect the diagnostics to be formatted consistently with other diagnostics and they should expect them to sometimes be misleading. For example, FlagProperty and ObjectFlagProperty have uglier formatting when the property
value
does not match a value with a custom flag description. An example of a misleading diagnostic is a diagnostic for a property that has no effect because some other property of the object is set in a way that causes the hidden property to have no effect. - fine → const DiagnosticLevel
-
A diagnostic that is likely to be low value but where the diagnostic display is just as high quality as a diagnostic with a higher level.
Use this level for diagnostic properties that match their default value and other cases where showing a diagnostic would not add much value such as an IterableProperty where the value is empty.
- debug → const DiagnosticLevel
-
Diagnostics that should only be shown when performing fine grained debugging of an object.
Unlike a fine diagnostic, these diagnostics provide important information about the object that is likely to be needed to debug. Used by properties that are important but where the property value is too verbose (e.g. 300+ characters long) to show with a higher diagnostic level.
- info → const DiagnosticLevel
-
Interesting diagnostics that should be typically shown.
- warning → const DiagnosticLevel
-
Very important diagnostics that indicate problematic property values.
For example, use if you would write the property description message in ALL CAPS.
- hint → const DiagnosticLevel
-
Diagnostics that provide a hint about best practices.
For example, a diagnostic describing best practices for fixing an error.
- summary → const DiagnosticLevel
-
Diagnostics that summarize other diagnostics present.
For example, use this level for a short one or two line summary describing other diagnostics present.
- error → const DiagnosticLevel
-
Diagnostics that indicate errors or unexpected conditions.
For example, use for property values where computing the value throws an exception.
- off → const DiagnosticLevel
-
Special level indicating that no diagnostics should be shown.
Do not specify this level for diagnostics. This level is only used to filter which diagnostics are shown.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
DiagnosticLevel> - A constant List of the values in this enum, in order of their declaration.