batteryPercent abstract method

Future<double> batteryPercent({
  1. Map<String, dynamic>? extra,
})

Get the remaining battery charge, as a percentage from 0 to 100.

var batteryPercent = await myPowerSensor.batteryPercent();

For more information, see Power Sensor component.

Implementation

Future<double> batteryPercent({Map<String, dynamic>? extra});