Skip to content
pubscout

wakelock_plus

1.8.2, released 4 weeks ago by fluttercommunity.dev

Keep the device screen awake across mobile, desktop, and web platforms.

WASM-readyRock solid
$ flutter pub add wakelock_plus
Source repository

What it does

Controls the screen wakelock to prevent a device display from dimming or turning off automatically. It provides simple imperative functions to enable, disable, or query the wakelock state across all supported platforms. Because it only manages the screen state rather than CPU background execution, it requires no special platform permissions.

AI-written summary of version 1.8.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • Playing video or audio media where user interaction is absent but the display must stay active.
  • Displaying long-form reading, dashboards, recipes, or presentation screens without unwanted screen timeouts.
  • Targeting multiple platforms including mobile, desktop, and web with a unified screen wakelock API.

Skip it when

  • You need background CPU processing while the screen is off (partial wakelocks are not supported).
  • General window management or desktop-specific window controls are needed beyond keeping the display awake.

Strengths

  • No special permissions required on any platform.
  • Comprehensive platform support covering Android, iOS, macOS, Windows, Linux, and Web.
  • Simple API with enable, disable, toggle, and status check methods.

Weaknesses

  • High minimum SDK requirements (requires Flutter SDK >=3.41.0 and Dart SDK >=3.11.0).
  • May require manual ndkVersion adjustments in Android Gradle configurations if errors arise.

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
6

No permissions required. On Android, you may need to explicitly specify an NDK version in build.gradle if prompted.

import 'package:wakelock_plus/wakelock_plus.dart';

// Keep the screen awake
WakelockPlus.enable();

// Allow the screen to sleep again
WakelockPlus.disable();

// Check if wakelock is currently active
bool isEnabled = await WakelockPlus.enabled;

Alternatives

Packages that do the same job and could replace wakelock_plus.

  • window_manager

    Pick if you need desktop window management (resizing, positioning, always-on-top) rather than just mobile/cross-platform screen wakelocks.

Works with

Packages commonly used together with wakelock_plus: ones it builds on, ones built on it, and its own family.