toJson method
Serialise data back to json from the model
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data["batteryCapacity"] = this.batteryCapacity;
data["batteryLevel"] = this.batteryLevel;
data["chargingStatus"] = this.chargingStatus;
data["chargeTimeRemaining"] = this.chargeTimeRemaining;
data["currentAverage"] = this.currentAverage;
data["currentNow"] = this.currentNow;
data["health"] = this.health;
data["pluggedStatus"] = this.pluggedStatus;
data["present"] = this.present;
data["scale"] = this.scale;
data["remainingEnergy"] = this.remainingEnergy;
data["temperature"] = this.temperature;
data["technology"] = this.technology;
data["voltage"] = this.voltage;
return data;
}