Flight.fromJson constructor

Flight.fromJson(
  1. Map json_
)

Implementation

Flight.fromJson(core.Map json_)
  : this(
      endDate:
          json_.containsKey('endDate')
              ? core.DateTime.parse(json_['endDate'] as core.String)
              : null,
      rateOrCost: json_['rateOrCost'] as core.String?,
      startDate:
          json_.containsKey('startDate')
              ? core.DateTime.parse(json_['startDate'] as core.String)
              : null,
      units: json_['units'] as core.String?,
    );