Skip to content
pubscout

keep_screen_on

7.0.0, released 3 months ago by craftsoft.dev

Disables automatic screen off and prevents the screen from turning off.

$ flutter pub add keep_screen_on
Source repository

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.