toJson method

Map toJson()

Implementation

Map toJson () => {
  'id': id,
  'name': name,
  'description': description,
  'tripState': tripState,
  'totalDistance': totalDistance,
  'totalDuration': totalDuration,
  'totalElevationGain': totalElevationGain,
  'metadata': metadata,
  'startLocation': startLocation?.toJson(),
  'endLocation': endLocation?.toJson(),
  'user': user?.toJson(),
  'startedAt': startedAt,
  'endedAt': endedAt,
  'createdAt': createdAt,
  'updatedAt': updatedAt,
  'isLocal': isLocal,
  'hasMore': hasMore,
  'stops': getStopList(stops),
  'events': getEventsMapList(events),
  'route': getRouteList(route),
  'routeIndex': routeIndex
};