PowerManager class

Power Management Module for wake locks and battery optimization.

Constructors

PowerManager(MethodChannel _channel)

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

acquireWakeLock({int? timeoutMillis}) Future<void>
Acquires a wake lock to keep the device awake. timeoutMillis - optional timeout.
isBatterySaverEnabled() Future<bool>
Checks if battery saver mode is enabled.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
releaseWakeLock() Future<void>
Releases an acquired wake lock.
requestIgnoreBatteryOptimizations() Future<void>
Requests ignoring battery optimizations.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited