Merge pull request #248 from cake-tech/CW-fix-wakelock-bug

change type string to bool in Wakelock class
This commit is contained in:
mkyq 2022-01-26 17:46:44 +02:00 committed by GitHub
commit 18a1f60433
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,7 @@ class WakeLock {
Future<void> enableWake() async {
try {
await _utils.invokeMethod<String>('enableWakeScreen');
await _utils.invokeMethod<bool>('enableWakeScreen');
} on PlatformException catch (_) {
print('Failed enabling screen wakelock');
}
@ -13,7 +13,7 @@ class WakeLock {
Future<void> disableWake() async {
try {
await _utils.invokeMethod<String>('disableWakeScreen');
await _utils.invokeMethod<bool>('disableWakeScreen');
} on PlatformException catch (_) {
print('Failed enabling screen wakelock');
}