WakelockPlusMacOSPlugin class

The macOS implementation of the WakelockPlusPlatformInterface.

This class implements the wakelock_plus plugin functionality for macOS.

Note that this is also a method channel implementation (like the default instance). We use manual method channel calls instead of pigeon for the moment because macOS support for pigeon is not clear yet. See https://github.com/flutter/flutter/issues/73738.

Inheritance
  • Object
  • PlatformInterface
  • WakelockPlusPlatformInterface
  • WakelockPlusMacOSPlugin

Constructors

WakelockPlusMacOSPlugin()

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.