status method
The /power status line.
Implementation
PowerAssertionStatus status() {
final handle = _handle;
return PowerAssertionStatus(
level: level,
hold: hold,
held: handle?.held ?? false,
detail:
handle?.description ??
switch (level) {
PowerAssertionLevel.off => 'disabled by config',
_ => 'not acquired',
},
);
}