toJson method
Returns a JSON representation of this object.
Implementation
Map<String, dynamic> toJson() {
return {
ApiFields.stopName: stopName,
ApiFields.predictions:
predictions.map((prediction) => prediction.toJson()).toList(),
};
}