batteryPercent abstract method
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});