Flight.fromJson constructor
Implementation
Flight.fromJson(Map<String, dynamic> json)
: this.timeline = (json['timeline'] as List).map((i) {
if (i['type'] ==
EnumConvertion.convertToString(
FlightElementType.waypointMission)) {
return FlightElementWaypointMission.fromJson(i);
} else {
return FlightElement.fromJson(i);
}
}).toList();