mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 00:05:16 +00:00
Lock device awake during calls
This commit is contained in:
9
lib/utils/device_utils.dart
Normal file
9
lib/utils/device_utils.dart
Normal file
@ -0,0 +1,9 @@
|
||||
import 'package:wakelock/wakelock.dart';
|
||||
|
||||
/// Device utilities
|
||||
///
|
||||
/// @author Pierre Hubert
|
||||
|
||||
/// Interface for requesting device wake locking
|
||||
Future<void> setWakeLock(bool enabled) async =>
|
||||
await Wakelock.toggle(on: enabled);
|
Reference in New Issue
Block a user