Waypoint.fromJson constructor

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

Implementation

factory Waypoint.fromJson(Map<String, dynamic> json) => Waypoint(
  timeZone:
      json["time_zone"] != null ? TimeZone.fromJson(json["time_zone"]) : null,
  distance: json["distance"]?.toDouble(),
  name: json["name"],
  location:
      json["location"] != null
          ? List<double>.from(json["location"].map((x) => x?.toDouble()))
          : null,
);