2

i am trying to write simple code to draw a route line between two location on google map, i used flutter_polyline_points package for that, i wrote simple code as the follows:

List<PointLatLng> results = await polylinePoints.getRouteBetweenCoordinates(api_key, 38.00000000, 40.222222, 41.1111111, 45.222222222);

but an exception is appeared every time i run the code which is:

Exception has occurred. _Exception (Exception: RangeError (index): Invalid value: Valid value range is empty: 0)

*** can any body tell me how i can fix the error?

omar shady
  • 151
  • 3
  • 8

0 Answers0