toJson method
Implementation
core.Map<core.String, core.dynamic> toJson() => {
if (batteryHealth != null) 'batteryHealth': batteryHealth!,
if (cycleCount != null) 'cycleCount': cycleCount!,
if (fullChargeCapacity != null)
'fullChargeCapacity': fullChargeCapacity!,
if (reportTime != null) 'reportTime': reportTime!,
if (sample != null) 'sample': sample!,
if (serialNumber != null) 'serialNumber': serialNumber!,
};