NearestResponse.fromMap constructor
fromMap method to get the NearestResponse from a json map
Implementation
factory NearestResponse.fromMap(Map<String, dynamic> json) {
return NearestResponse(
code: OsrmResponseCode.fromString(json['code']),
message: json['message'],
waypoints: (json['waypoints'] as List).map((e) => OsrmWaypoint.fromMap(e)).toList(),
);
}