toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['distance'] = distance;
data['duration'] = duration;
data['summary'] = summary;
if (steps != null) {
data['steps'] = steps!.map((v) => v.toJson()).toList();
}
return data;
}