shtuff
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user