toJson method
Converts Place to JSON map. Note: isLocal is not serialized as it's determined by source.
Implementation
Map<String, dynamic> toJson() {
return {
'id': id,
'lat': lat,
'lng': lng,
'note': note,
'timestamp': timestamp,
if (address != null) 'address': address,
};
}