iterateRoutes method
Iterates routes. It's usually used for locating a specific route.
callback
The callback function to be called for each route.
Returns true to break the iteration.
Implementation
void iterateRoutes(bool Function(Route<dynamic> route) callback) {
for (var route in _history) {
if (callback(route.route)) {
break;
}
}
}