getCoorsStartToEnd method

Future<TrafficResponse> getCoorsStartToEnd(
  1. LatLng start,
  2. LatLng end
)

Implementation

Future<TrafficResponse> getCoorsStartToEnd(LatLng start, LatLng end) async {
  final String coorsString =
      '${start.longitude},${start.latitude};${end.longitude},${end.latitude}';
  final String url = '${Environment.trafficBaseUrl}/driving/$coorsString';

  final response = await _dioTraffic.get(url);
  return TrafficResponse.fromJson(response.data);
}