getLastFocusInRoute method
Gets the last focus entry for a specific route.
routeName The route name
Returns the last entry in the specified route, or null if none found
Implementation
FocusHistoryEntry? getLastFocusInRoute(String routeName) {
for (int i = _stack.length - 1; i >= 0; i--) {
final entry = _stack[i];
if (entry.route?.settings.name == routeName) {
return entry;
}
}
return null;
}