keepScreenOff method

  1. @override
Future<void> keepScreenOff()
override

Implementation

@override
Future<void> keepScreenOff() async {
  if (_wakeLockSentinel == null) return;
  try {
    await _wakeLockSentinel!.release().toDart;
  } catch (_) {}
  _wakeLockSentinel = null;
  await _visibilitySub?.cancel();
  _visibilitySub = null;
}