toJson method
Implementation
Map<String, dynamic> toJson() {
final data = <String, dynamic>{};
if (sensor != null) {
data['sensor'] = sensor!.toJson();
}
data['start_date'] = startDate;
data['end_date'] = endDate;
data['time_delta'] = timeDelta;
data['deleted'] = deleted;
data['value'] = value;
data['extra_data'] = extraData;
if (together != null) {
data['together'] = together!.map((v) => v.toJson()).toList();
}
data['id'] = id;
return data;
}