Route.fromJson constructor

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

Implementation

factory Route.fromJson(Map<String, dynamic> json) => Route(
  weightTypical: json["weight_typical"]?.toDouble(),
  durationTypical: json["duration_typical"]?.toDouble(),
  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: Geometry.fromJson(json["geometry"]),
);