getChargingStatus method
Implementation
ChargingStatus getChargingStatus(String? status) {
switch (status) {
case "charging":
return ChargingStatus.Charging;
case "unplugged":
return ChargingStatus.Discharging;
case "full":
return ChargingStatus.Full;
default:
return ChargingStatus.Unknown;
}
}