ValhallaResponse.fromJson constructor
Implementation
factory ValhallaResponse.fromJson(Map<String, dynamic> json) {
return ValhallaResponse._(
trip: Trip.fromJson(json['trip']),
alternates: json.containsKey('alternates')
? (json['alternates'] as List)
.map((alternate) => Trip.fromJson(alternate['trip']))
.toList()
: null,
id: json['id'],
);
}