keep_screen_on
7.0.0, released 3 months ago by craftsoft.dev
Disables automatic screen off and prevents the screen from turning off.
What it does
This plugin prevents the device screen from automatically turning off. It provides methods to turn the keep-screen-on feature on or off, check its status, and manage platform-specific Android flags.
AI-written summary of version 7.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are building an app where the screen needs to stay active during usage like reading or presentations.
- You need programmatic control over screen timeout behavior on Android and iOS.
Skip it when
- You want a declarative widget-based solution to control screen behavior.
- You are looking for screen wake-lock features outside of Android and iOS.
Strengths
- Simple API to turn the screen lock on and off.
- Supports fine-grained Android-specific flags like FLAG_ALLOW_LOCK_WHILE_SCREEN_ON.
Weaknesses
- Requires manual cleanup in dispose methods to prevent the screen from staying on indefinitely.
- Some methods and features are only available on Android.
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
Not documented
KeepScreenOn.turnOn();Alternatives
Packages that do the same job and could replace keep_screen_on.
- wakelock_plus
Keep the device screen awake across mobile, desktop, and web platforms.
92Compare - no_screenshot
Disable screenshots and screen recording, detect events, and show overlays in the app switcher.
87Compare - flutter_overlay_window
Flutter plugin to display your app over other apps on the screen.
85Compare - screen_corner_radius
Provides the corner radius value of the current device screen for Android and iOS.
47Compare