DeviceDisplayBrightness class

Constructors

DeviceDisplayBrightness()

Properties

hashCode int
The hash code for this object.
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
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

getBrightness() Future<double>
Returns the display backlight brightness between 0 and 1.
isKeptOn() Future<bool>
Returns true if the device's screen is keeping turned on.
keepOn({required bool enabled}) Future<void>
If enabled == true, the device's screen will be keeping turned on.
resetBrightness() Future<void>
In iOS: Resets brightness to last known system value. System value is fetched, when app starts.
setBrightness(double brightness) Future<void>
The value of brightness should be a number between 0.0 and 1.0, inclusive.