Path route in driving mode

When i am using google map and in this google map i want to show a path route (in driving mode ) between 2 locations but i’m getting null in getPolyLinescoordinates .

Share your code snippet as well. It will be a lot easier to look at what you are doing and then provide a solution for it.

Getting null when calling _googleMapPolyline.getCoordinatesWithLocation.

      routeCoords = await _googleMapPolyline.getCoordinatesWithLocation(
          origin: LatLng(22.5735, 88.4331),
          destination: LatLng(22.6420, 88.4312),
          mode: RouteMode.driving);
      print('routeCoords $routeCoords');