batteryLevel property

Future<num> get batteryLevel

Uses method channel for getting battery level.

Returns -1 if batteryState is unknown in iOS

Implementation

static Future<num> get batteryLevel async {
  return await _methodChannel.invokeMethod('getBatteryLevel');
}