WakelockPlusLinuxPlugin class

The Linux implementation of the WakelockPlusPlatformInterface.

This class implements the wakelock_plus plugin functionality for Linux using the org.freedesktop.ScreenSaver D-Bus API (see https://specifications.freedesktop.org/idle-inhibit-spec/latest/re01.html).

Inheritance
  • Object
  • PlatformInterface
  • WakelockPlusPlatformInterface
  • WakelockPlusLinuxPlugin

Constructors

WakelockPlusLinuxPlugin({@visibleForTesting DBusRemoteObject? object})
Constructs an instance of WakelockPlusLinuxPlugin.

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 setterinherited
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.