1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-23 05:19:22 +00:00
comunicmobile/lib/plugins_interface/wake_lock.dart

10 lines
245 B
Dart
Raw Normal View History

2020-04-23 15:37:12 +00:00
import 'package:wakelock/wakelock.dart';
2020-04-24 10:19:13 +00:00
/// Wake lock plugin interface
2020-04-23 15:37:12 +00:00
///
/// @author Pierre Hubert
/// Interface for requesting device wake locking
Future<void> setWakeLock(bool enabled) async =>
2021-02-07 16:09:08 +00:00
await Wakelock.toggle(enable: enabled);