batteryState property
Returns the current battery state in percent.
Implementation
@override
Future<BatteryState> get batteryState => methodChannel
.invokeMethod<String>('getBatteryState')
.then<BatteryState>((dynamic result) => parseBatteryState(result));