void onLegSelected(int legIndex) { directionsController!.setState!(() => _currentIndex = legIndex); }