feat(lyrics): keep the screen awake while viewing lyrics

This commit is contained in:
zarzet committed 2026-09-30 20:21:21 +07:00
1 parent a1cec6de51
commit 8aa8d598d8
14 files changed
+276

No files matched your search

+9
View File
@@ -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);