Severity enum

Severity levels as a bitmask. Possible values are debug, info, warning, error.

// example
int severity = Severity.warning.value | Severity.error.value;

// test for bitmask inclusion
bool isError = Severity.hasLevel(_severity, Severity.debug);
Inheritance
Available extensions

Values

debug → const Severity
const Severity(1 << 0)
info → const Severity
const Severity(1 << 1)
warning → const Severity
const Severity(1 << 2)
error → const Severity
const Severity(1 << 3)

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
value int
final

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

Static Properties

all int
Returns the value of all levels, i.e. Severity.debug.value | Severity.info.value | Severity.warning.value | Severity.error.value
no setter
allExceptDebug int
Returns the value of all levels except for debug, i.e. Severity.info.value | Severity.warning.value | Severity.error.value
no setter

Static Methods

hasLevel(int bitmask, Severity level) bool
Tests if the bitmask includes the specified Severity level.

Constants

values → const List<Severity>
A constant List of the values in this enum, in order of their declaration.