Intersection.fromJson constructor

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

Implementation

factory Intersection.fromJson(Map<String, dynamic> json) => Intersection(
      entry: List<bool>.from(json["entry"].map((x) => x)),
      bearings: List<int>.from(json["bearings"].map((x) => x)),
      duration: json["duration"]?.toDouble(),
      mapboxStreetsV8: json["mapbox_streets_v8"] == null
          ? null
          : MapboxStreetsV8.fromJson(json["mapbox_streets_v8"]),
      isUrban: json["is_urban"],
      adminIndex: json["admin_index"],
      out: json["out"],
      weight: json["weight"]?.toDouble(),
      geometryIndex: json["geometry_index"],
      location: List<double>.from(json["location"].map((x) => x?.toDouble())),
      intersectionIn: json["in"],
      turnWeight: json["turn_weight"]?.toDouble(),
      turnDuration: json["turn_duration"]?.toDouble(),
      trafficSignal: json["traffic_signal"],
      lanes: json["lanes"] == null
          ? []
          : List<Lane>.from(json["lanes"]!.map((x) => Lane.fromJson(x))),
    );