DrivingDirections.fromJson constructor
Implementation
factory DrivingDirections.fromJson(Map<String, dynamic> json) {
List<EasyRoute> routes = (json['routes'] as List)
.map((routeJson) => EasyRoute.fromJson(routeJson))
.toList();
List<Waypoint> waypoints = (json['waypoints'] as List)
.map((waypointJson) => Waypoint.fromJson(waypointJson))
.toList();
return DrivingDirections(
code: json['code'],
routes: routes,
waypoints: waypoints,
);
}