toJson method
Produces a Map that can be serialized to JSON.
Implementation
Map<String, dynamic> toJson() {
return {
...?unknown,
'min': min,
'max': max,
'count': count,
'sum': sum,
if (tags?.isNotEmpty ?? false) 'tags': tags,
};
}