areRouteBasesDifferent function
Compares two lists of RouteBase
to determine if they are different.
Args: routes1 (List
Returns: bool: True if the routes are different, False otherwise.
Implementation
bool areRouteBasesDifferent(List<RouteBase> routes1, List<RouteBase> routes2) {
// Check if the lengths of the route lists are different
if (routes1.length != routes2.length) {
return true;
}
// Compare corresponding routes from both lists
for (int index = 0; index < routes1.length; index++) {
if (!_areRouteBasesEqual(routes1[index], routes2[index])) {
return true;
}
}
return false;
}