WakelockPlusWindowsPlugin class

The Windows implementation of the WakelockPlusPlatformInterface.

This class implements the wakelock_plus plugin functionality for Windows using the SetThreadExecutionState win32 API (see https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate).

Inheritance
  • Object
  • PlatformInterface
  • WakelockPlusPlatformInterface
  • WakelockPlusWindowsPlugin

Constructors

WakelockPlusWindowsPlugin()

Properties

enabled Future<bool>
Returns whether the wakelock is enabled or not.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
isMock bool
Only mock implementations should set this to true.
no setteroverride
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.
override
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

registerWith() → void
Registers this class as the default instance of WakelockPlatformInterface.