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["batteryLevel"] = this.batteryLevel;
data["chargingStatus"] = this.chargingStatus;
return data;
}