Leg.fromJson constructor
Implementation
factory Leg.fromJson(Map<String, dynamic> json) => Leg(
viaWaypoints: List<dynamic>.from(json["via_waypoints"].map((x) => x)),
admins: List<Admin>.from(json["admins"].map((x) => Admin.fromJson(x))),
weight: json["weight"]?.toDouble(),
duration: json["duration"]?.toDouble(),
steps: List<Step>.from(json["steps"].map((x) => Step.fromJson(x))),
distance: json["distance"]?.toDouble(),
summary: json["summary"],
);