toJson method
Implementation
Map<String, dynamic> toJson() {
final oldestDate = this.oldestDate;
final latestDate = this.latestDate;
return {
'oldestDate': unixTimestampToJson(oldestDate),
if (latestDate != null) 'latestDate': unixTimestampToJson(latestDate),
};
}