updateDirectionsSheet method
Implementation
void updateDirectionsSheet(int legIndex) {
if (legIndex < 0) {
return;
}
int tempIndex = min(legIndex, _currentRoute!.legs!.length - 1);
_directionsRenderer?.selectLegIndex(tempIndex);
directionsController!.setState!(() => _currentIndex = tempIndex);
}