1
0
Fork 0
mirror of https://gitlab.com/nkming2/nc-photos.git synced 2025-03-12 02:08:53 +01:00
nc-photos/app/lib/widget/wakelock_util.dart

16 lines
348 B
Dart
Raw Normal View History

2021-09-14 22:39:34 +02:00
import 'package:flutter/widgets.dart';
import 'package:nc_photos/widget/disposable.dart';
2023-07-10 16:22:23 +02:00
import 'package:wakelock_plus/wakelock_plus.dart';
2021-09-14 22:39:34 +02:00
class WakelockControllerDisposable implements Disposable {
@override
2023-07-10 16:22:23 +02:00
void init(State state) {
WakelockPlus.enable();
2021-09-14 22:39:34 +02:00
}
@override
2023-07-10 16:22:23 +02:00
void dispose(State state) {
WakelockPlus.disable();
2021-09-14 22:39:34 +02:00
}
}