getBatteryLevel method

Future<int> getBatteryLevel()

Gets the current battery level as a percentage (0–100).

Implementation

Future<int> getBatteryLevel() async {
  final int raw = (await _get(CapturePropertyIds.batteryLevelDevice)) as int;
  return batteryLevelPercent(raw);
}