KeepScreenOnPlatform class abstract

The KeepScreen class controls the automatic screen off.

Inheritance
  • Object
  • PlatformInterface
  • KeepScreenOnPlatform
Implementers

Constructors

KeepScreenOnPlatform()

Properties

hashCode int
The hash code for this object.
no setterinherited
isAllowLockWhileScreenOn Future<bool?>
Returns true if the FLAG_ALLOW_LOCK_WHILE_SCREEN_ON flag is assigned (Android only).
no setter
isOff Future<bool?>
Returns true if automatic screen off is enabled.
no setter
isOn Future<bool?>
Returns true if automatic screen off is disabled.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addAllowLockWhileScreenOn({bool on = true}) Future<bool>
Assign the FLAG_ALLOW_LOCK_WHILE_SCREEN_ON flag to the window (Android only). If you specify false for on, the opposite operation is performed.
clearAllowLockWhileScreenOn() Future<bool>
Clears the FLAG_ALLOW_LOCK_WHILE_SCREEN_ON flag from the window (Android only).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
turnOff({bool withAllowLockWhileScreenOn = false}) Future<bool>
Enables automatic screen off. (Reset to default.) It is recommended to call it with the dispose method of StatefulWidget.
turnOn({bool on = true, bool withAllowLockWhileScreenOn = false}) Future<bool>
Disables automatic screen off. If you specify false for on, the opposite operation is performed.

Operators

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

Static Properties

instance KeepScreenOnPlatform
getter/setter pair