toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final data = <String, dynamic>{};
  data['id'] = id;
  data['title'] = title;
  data['point'] = point?.toJson();
  data['distance'] = distance;
  data['duration'] = duration;
  return data;
}