Airport.fromJson constructor
Airport.fromJson( - Map<String, dynamic> json
)
Implementation
factory Airport.fromJson(Map<String, dynamic> json) {
return Airport(
id: json['id'],
ident: json['ident'],
type: json['type'],
name: json['name'],
latitudeDeg: json['latitude_deg']?.toDouble(),
longitudeDeg: json['longitude_deg']?.toDouble(),
elevationFt: json['elevation_ft'],
continent: json['continent'],
isoCountry: json['iso_country'],
isoRegion: json['iso_region'],
municipality: json['municipality'],
gpsCode: json['gps_code'],
iataCode: json['iata_code'],
localCode: json['local_code'],
);
}