Intersection.fromJson constructor
Intersection.fromJson(
- 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(),
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"],
turnDuration: json["turn_duration"]?.toDouble(),
turnWeight: json["turn_weight"]?.toDouble(),
classes: json["classes"] == null
? []
: List<String>.from(json["classes"]!.map((x) => x)),
);