startPowerFlow method
Settings → Power: the power: config section (sleep prevention,
issues #325/#326) — the sleepPrevention level and the hold
lifecycle. Writes go through the surgical validated-yaml upsert
into the USER config, and every successful write re-arms the
session's assertion from the saved file (_reloadPowerAssertions
— what's live is what's on disk). Loops until cancelled or done.
Implementation
Future<void> startPowerFlow() async {
for (;;) {
final picked = await _pickOption('power', _powerMenuOptions());
if (picked == null || picked == 'done') return;
await _applyPowerPick(picked);
}
}