getBatteryInfo method
Implementation
@override
Future<BatteryInfo> getBatteryInfo() async {
final map = await methodChannel.invokeMapMethod<dynamic, dynamic>('getBatteryInfo');
if (map == null) {
throw PlatformException(
code: 'NULL_RESPONSE',
message: 'getBatteryInfo returned null',
);
}
return BatteryInfo.fromMap(map);
}