screenBrightness static method

Future<double?> screenBrightness()

Get the screen brightness. The range of returned value is 0.0, 1.0

Implementation

static Future<double?> screenBrightness() {
  if (Platform.isAndroid || Platform.isIOS) {
    return _channel.invokeMethod("brightness");
  }
  return Future.value(0);
}