WakelockPlatformInterface class abstract

The interface that implementations of wakelock must implement.

Platform implementations should extend this class rather than implement it because implements does not consider newly added methods to be breaking changes. Extending this class (using extends) ensures that the subclass will get the default implementation.

Implementers

Constructors

WakelockPlatformInterface()

Properties

enabled Future<bool>
Returns whether the wakelock is enabled or not.
no setter
hashCode int
The hash code for this object.
no setterinherited
isMock bool
Only mock implementations should set this to true.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toggle({required bool enable}) Future<void>
Toggles the wakelock based on the given enable value.
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance WakelockPlatformInterface
The default instance of the WakelockPlatformInterface to use.
getter/setter pair