nc-photos/app/lib/widget/wakelock_util.dart
2023-07-10 22:22:54 +08:00

15 lines
348 B
Dart

import 'package:flutter/widgets.dart';
import 'package:nc_photos/widget/disposable.dart';
import 'package:wakelock_plus/wakelock_plus.dart';
class WakelockControllerDisposable implements Disposable {
@override
void init(State state) {
WakelockPlus.enable();
}
@override
void dispose(State state) {
WakelockPlus.disable();
}
}