PowerAssertionLevel enum
The power.sleepPrevention levels. Cumulative: each level adds the
capabilities of all lower levels (display also prevents idle sleep,
system also prevents display sleep).
Values
- off → const PowerAssertionLevel
-
No assertion at all.
const PowerAssertionLevel('off') - idle → const PowerAssertionLevel
-
Keep the system from idle-sleeping (macOS
caffeinate -i). The default — matches oh-my-pi and the historical behaviour.const PowerAssertionLevel('idle') - display → const PowerAssertionLevel
-
Also keep the display from idle-sleeping (
caffeinate -i -d).const PowerAssertionLevel('display') - system → const PowerAssertionLevel
-
Also block all system sleep on AC and declare the user active (
caffeinate -i -d -s -u).const PowerAssertionLevel('system')
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 → String
-
The yaml/config label.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromValue(
String? value) → PowerAssertionLevel? -
The level for a config label, or null when
valueis not one.
Constants
-
values
→ const List<
PowerAssertionLevel> - A constant List of the values in this enum, in order of their declaration.