toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  json[r'departure'] = this.departure;
  json[r'arrival'] = this.arrival;
  json[r'lastUpdatedUtc'] = this.lastUpdatedUtc.toUtc().toIso8601String();
  json[r'number'] = this.number;
  json[r'status'] = this.status;
  json[r'codeshareStatus'] = this.codeshareStatus;
  json[r'isCargo'] = this.isCargo;
  if (this.greatCircleDistance != null) {
    json[r'greatCircleDistance'] = this.greatCircleDistance;
  } else {
    json[r'greatCircleDistance'] = null;
  }
  if (this.callSign != null) {
    json[r'callSign'] = this.callSign;
  } else {
    json[r'callSign'] = null;
  }
  if (this.aircraft != null) {
    json[r'aircraft'] = this.aircraft;
  } else {
    json[r'aircraft'] = null;
  }
  if (this.airline != null) {
    json[r'airline'] = this.airline;
  } else {
    json[r'airline'] = null;
  }
  if (this.location != null) {
    json[r'location'] = this.location;
  } else {
    json[r'location'] = null;
  }
  return json;
}