Getting this error. I have Directions API enabled in google account.
Unhandled Exception: Exception: RangeError (index): Invalid value: Valid value range is empty: 0
#0 NetworkUtil.getRouteBetweenCoordinates
package:flutter_polyline_points/src/network_util.dart:29
<asynchronous suspension>
#1 PolylinePoints.getRouteBetweenCoordinates
package:flutter_polyline_points/flutter_polyline_points.dart:22
#2 MapPageState.setPolylines
package:routelines/main.dart:104
#3 MapPageState.onMapCreated
package:routelines/main.dart:78
#4 _GoogleMapState.onPlatformViewCreated
package:google_maps_flutter/src/google_map.dart:317
#5 _rootRunUnary (dart:async/zone.dart:1198:47)
#6 _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#7 _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#8 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#9 Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#10 Future._completeWithValu<…>
What's the issue. Can anyone guide?