Wakelock class Null safety
Class providing all wakelock functionality using static members.
To enable the wakelock, you can use Wakelock.enable and to disable it, you can call Wakelock.disable. You do not need to worry about making redundant calls, e.g. calling Wakelock.enable when the wakelock is already enabled as the plugin handles this for you, i.e. it checks the status to determine if the wakelock is already enabled or disabled. If you want the flexibility to pass a bool to control whether the wakelock should be enabled or disabled, you can use Wakelock.toggle.
The Wakelock.enabled getter allows you to retrieve the current wakelock status of the device..
Constructors
- Wakelock()
Properties
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited