setBrightness method

Future<void> setBrightness(
  1. double brightness
)

Sets the screen brightness (0.0 to 1.0). Note: On Android, this usually affects the window attributes.

Implementation

Future<void> setBrightness(double brightness) async {
  await _channel.invokeMethod('hardware.setBrightness', {'brightness': brightness});
}