Step.fromJson constructor

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

Implementation

factory Step.fromJson(Map<String, dynamic> json) => Step(
      intersections: List<Intersection>.from(
          json["intersections"].map((x) => Intersection.fromJson(x))),
      maneuver: Maneuver.fromJson(json["maneuver"]),
      name: json["name"],
      duration: json["duration"]?.toDouble(),
      distance: json["distance"]?.toDouble(),
      drivingSide: json["driving_side"],
      weight: json["weight"]?.toDouble(),
      mode: json["mode"],
      geometry: json["geometry"],
    );