TrafficResponse.fromJson constructor

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

Implementation

factory TrafficResponse.fromJson(Map<String, dynamic> json) =>
    TrafficResponse(
      routes: List<Route>.from(json["routes"].map((x) => Route.fromJson(x))),
      waypoints: List<Waypoint>.from(
          json["waypoints"]?.map((x) => Waypoint.fromJson(x))),
      code: json["code"],
      uuid: json["uuid"],
    );