getChargingStatus method

ChargingStatus getChargingStatus(
  1. String? status
)

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;
  }
}