flutter_keepscreenon 0.0.3 flutter_keepscreenon: ^0.0.3 copied to clipboard
A package can help you to prevent your flutter app's screen going to sleep programmatically.
flutter_keepscreenon #
A package can help you to prevent your flutter app's screen going to sleep programmatically.
Getting Started #
Installation #
Add this to your pubspec.yaml (or create it):
dependencies:
flutter_keepscreenon: any
Then run the flutter tooling:
flutter packages get
Example #
try {
await FlutterKeepscreenon.activateKeepScreenOn; // activate
// await FlutterKeepscreenon.deactivateKeepScreenOn; // deactivate
} on PlatformException catch (e) {
print(e);
}
Details in example/ folder.