Make Settings a top-level navigation destination
Show Back only when Settings is reached through a pushed route, and remove duplicate Settings controls where the shell already provides navigation. Update focused widget coverage and document the destination behavior.
This commit is contained in:
@@ -706,6 +706,16 @@ class _PipelinesAppState extends State<PipelinesApp>
|
||||
}
|
||||
|
||||
void _selectDestination(AppDestination destination) {
|
||||
// Settings is shown from its own nav item and has no Back, so its route
|
||||
// (filed under the Pipelines tab) must not trap the Pipelines item: that
|
||||
// item leaves Settings for the Pipelines body it showed before.
|
||||
if (destination == AppDestination.pipelines &&
|
||||
_delegate.shellRoute.kind == AppRouteKind.settings) {
|
||||
_delegate.goTo(
|
||||
_bodyRoutes[AppDestination.pipelines] ?? AppRoute.pipelines,
|
||||
);
|
||||
return;
|
||||
}
|
||||
final last = _tabRoutes[destination];
|
||||
_delegate.goTo(last ?? _routeOf(destination));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user