MethodChannelScreenBrightnessPro class

An implementation of ScreenBrightnessProPlatform that uses method channels.

Inheritance

Properties

eventChannel → EventChannel
The event channel used to listen for brightness changes.
final
hashCode → int
The hash code for this object.
no setterinherited
methodChannel → MethodChannel
The method channel used to interact with the native platform.
final
onBrightnessChanged → Stream<double>
Stream of brightness changes from the system.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

getBatteryLevel() → Future<double>
Returns the current battery level as a value between 0.0 and 1.0.
override
getBrightness() → Future<double?>
Returns the current screen brightness as a value between 0.0 and 1.0.
override
hasWriteSettingsPermission() → Future<bool>
Checks if the app has permission to write system settings (Android only).
override
isAutoModeEnabled() → Future<bool>
Checks if auto-brightness (automatic mode) is enabled.
override
isLowPowerModeEnabled() → Future<bool>
Checks if the device is currently in low power mode (battery saver).
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requestWriteSettingsPermission() → Future<void>
Requests permission to write system settings (Android only).
override
resetBrightness() → Future<void>
Resets the screen brightness to the system default.
override
setAutoMode(bool enabled) → Future<void>
Sets the auto-brightness mode.
override
setBrightness(double brightness) → Future<void>
Sets the screen brightness. brightness must be between 0.0 and 1.0.
override
setKeepScreenOn(bool enabled) → Future<void>
Controls whether the screen should stay on (prevent sleeping).
override
setSystemBrightness(double brightness) → Future<void>
Sets the global system brightness.
override
toString() → String
A string representation of this object.
inherited

Operators

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