NearestResponse.fromMap constructor

NearestResponse.fromMap(
  1. Map<String, dynamic> json
)

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(),
  );
}