docs: public boolean isLastLeg(RouteProgress routeProgress) {
      List<RouteLeg> legs = routeProgress.directionsRoute().legs();
      RouteLeg currentLeg = routeProgress.currentLeg();
      return currentLeg.equals(legs.get(legs.size() - 1));
    }