Persist exact tab locations including Settings under Pipelines

This commit is contained in:
2026-11-08 01:04:00 +00:00
parent d6006bb1f8
commit 151d99fbb6
10 changed files with 778 additions and 25 deletions
+10
View File
@@ -200,12 +200,14 @@ class AppRouterDelegate extends RouterDelegate<AppRoute> with ChangeNotifier {
@override
Future<void> setInitialRoutePath(AppRoute configuration) async {
_rememberParent(configuration);
_route = configuration;
}
@override
Future<void> setNewRoutePath(AppRoute configuration) async {
if (configuration == _route) return;
_rememberParent(configuration);
_route = configuration;
notifyListeners();
}
@@ -217,10 +219,18 @@ class AppRouterDelegate extends RouterDelegate<AppRoute> with ChangeNotifier {
Future<bool> popRoute() async =>
await _navigatorKey.currentState?.maybePop() ?? false;
void _rememberParent(AppRoute route) {
if (route.kind == AppRouteKind.templates ||
route.kind == AppRouteKind.schedules) {
_templatesReturn = AppRoute.settings;
}
}
/// Records a user move; the Router turns the new configuration into a
/// history entry (or a replacement when it already matches the location).
void goTo(AppRoute route) {
if (route == _route) return;
_rememberParent(route);
_route = route;
notifyListeners();
}