FlightElementWaypointMission.fromJson constructor

FlightElementWaypointMission.fromJson(
  1. Map<String, dynamic> json
)

Implementation

FlightElementWaypointMission.fromJson(Map<String, dynamic> json)
    : this.pointOfInterest = json['pointOfInterest'] != null
          ? FlightLocation.fromJson(json['pointOfInterest'])
          : null,
      this.maxFlightSpeed = json['maxFlightSpeed'] != null
          ? double.parse(json['maxFlightSpeed'].toString())
          : null,
      this.autoFlightSpeed = json['autoFlightSpeed'] != null
          ? double.parse(json['autoFlightSpeed'].toString())
          : null,
      this.finishedAction = EnumConvertion.convertFromString(
          FlightWaypointMissionFinishedAction.values, json['finishedAction']),
      this.headingMode = EnumConvertion.convertFromString(
          FlightWaypointMissionHeadingMode.values, json['headingMode']),
      this.flightPathMode = EnumConvertion.convertFromString(
          FlightWaypointMissionPathMode.values, json['flightPathMode']),
      this.rotateGimbalPitch =
          json['rotateGimbalPitch'] != null ? true : false,
      this.exitMissionOnRCSignalLost =
          json['exitMissionOnRCSignalLost'] != null ? true : false,
      this.waypoints = (json['waypoints'] as List)
          .map((i) => FlightWaypoint.fromJson(i))
          .toList(),
      super(type: FlightElementType.waypointMission);