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"],
  weightTypical: json["weight_typical"]?.toDouble(),
  durationTypical: json["duration_typical"]?.toDouble(),
  duration: json["duration"]?.toDouble(),
  distance: json["distance"]?.toDouble(),
  drivingSide: drivingSideValues.map[json["driving_side"]]!,
  weight: json["weight"]?.toDouble(),
  mode: modeValues.map[json["mode"]]!,
  geometry: Geometry.fromJson(json["geometry"]),
  destinations: json["destinations"],
);