toJson method
Serializes this model into a JSON-compatible map.
Implementation
Map<String, dynamic> toJson() => {
'path': path.map((p) => {'lat': p.latitude, 'lng': p.longitude}).toList(),
'distance': distance,
'timestamp': timestamp.toIso8601String(),
'customPoints':
customPoints
.map((p) => {'lat': p.latitude, 'lng': p.longitude})
.toList(),
};