This commit is contained in:
ImBenji
2024-05-01 19:28:51 +01:00
parent fc4d3ef898
commit c2ebac5bb5
30 changed files with 4727 additions and 403 deletions

View File

@@ -90,7 +90,9 @@ class TrackerModule extends InfoModule {
int stopIndex = liveInformation.getRouteVariant()!.busStops.indexOf(closestStop);
closestStop = liveInformation.getRouteVariant()!.busStops[stopIndex + 1];
int maxStops = liveInformation.getRouteVariant()!.busStops.length;
closestStop = liveInformation.getRouteVariant()!.busStops[min(stopIndex + 1, maxStops)];
print("Closest stop is now: ${closestStop.formattedStopName}");
} else {