MethodChannelKeepScreenOn class

The KeepScreen class controls the automatic screen off.

Inheritance

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 setteroverride
isOff Future<bool?>
Returns true if automatic screen off is enabled.
no setteroverride
isOn Future<bool?>
Returns true if automatic screen off is disabled.
no setteroverride
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.
override
clearAllowLockWhileScreenOn() Future<bool>
Clears the FLAG_ALLOW_LOCK_WHILE_SCREEN_ON flag from the window (Android only).
override
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.
override
turnOn({bool on = true, bool withAllowLockWhileScreenOn = false}) Future<bool>
Disables automatic screen off. If you specify false for on, the opposite operation is performed.
override

Operators

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