Trip.fromJson constructor
Implementation
factory Trip.fromJson(Map<String, dynamic> json) {
return Trip._(
locations: (json['locations'] as List)
.map((location) => Location.fromJson(location))
.toList(),
legs: (json['legs'] as List).map((leg) => Leg.fromJson(leg)).toList(),
summary: Summary.fromJson(json['summary']),
statusMessage: json['status_message'],
status: json['status'],
units: json['units'],
language: json['language'],
);
}