getCoordinatesWithLocation method

Future<List<LatLng>?> getCoordinatesWithLocation({
  1. required LatLng origin,
  2. required LatLng destination,
  3. required RouteMode mode,
})

Get coordinates using Location Coordinates Example : LatLng(40.677939, -73.941755)

Implementation

Future<List<LatLng>?> getCoordinatesWithLocation({
  required LatLng origin,
  required LatLng destination,
  required RouteMode mode,
}) async {
  _data = new PolylineRequestData(
      originLoc: origin,
      destinationLoc: destination,
      mode: mode,
      locationText: false,
      apiKey: apiKey);

  _utils = new PolylineUtils(_data);

  return await _utils.getCoordinates();
}