iosBatteryInfo property
Future<IosBatteryInfo?>
get
iosBatteryInfo
Returns the battery info as a single API call
Implementation
Future<IosBatteryInfo?> get iosBatteryInfo async {
try {
final batteryInfo = await methodChannel.invokeMethod('getBatteryInfo');
final converted = IosBatteryInfo.fromJson(Map.from(batteryInfo));
return converted;
} on PlatformException catch (e) {
print(e.message);
return null;
}
}