Route.fromJson constructor

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

Implementation

factory Route.fromJson(Map<String, dynamic> json) => Route(
      weightName: json["weight_name"],
      weight: json["weight"]?.toDouble(),
      duration: json["duration"]?.toDouble(),
      distance: json["distance"]?.toDouble(),
      legs: List<Leg>.from(json["legs"].map((x) => Leg.fromJson(x))),
      geometry: json["geometry"],
    );