mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-10-04 07:06:58 +02:00
feat(lyrics): keep the screen awake while viewing lyrics
This commit is contained in:
1 parent
a1cec6de51
commit
8aa8d598d8
14 files changed
+276
No files matched your search
@@ -173,6 +173,15 @@ class PlatformBridge {
|
||||
static const int notificationPercentTotal = 10000;
|
||||
|
||||
static const _channel = MethodChannel('com.zarz.spotiflac/backend');
|
||||
|
||||
static Future<void> setScreenAwake(bool enabled) async {
|
||||
if (defaultTargetPlatform != TargetPlatform.android &&
|
||||
defaultTargetPlatform != TargetPlatform.iOS) {
|
||||
return;
|
||||
}
|
||||
await _channel.invokeMethod<void>('setScreenAwake', {'enabled': enabled});
|
||||
}
|
||||
|
||||
static const _jsonResultFileKey = '__json_file';
|
||||
static const _backgroundJsonDecodeThresholdBytes = 128 * 1024;
|
||||
static const _metadataCacheTtl = Duration(minutes: 20);
|
||||
|
||||
Reference in new issue
Block a user