toJson method

Map<String, dynamic> toJson()

Returns a JSON object which represents this object.

Implementation

Map<String, dynamic> toJson() {
  return {
    ApiFields.latitude: latitude,
    ApiFields.longitude: longitude,
    ApiFields.name: name,
    ApiFields.routes: routes,
    ApiFields.stopId: stopId.toString(),
  };
}