feat(app): register native Settings on the shared live session

This commit is contained in:
2026-10-21 18:55:50 +01:00
parent 7b327f012b
commit d05aa0cfbc
15 changed files with 278 additions and 54 deletions
+14 -5
View File
@@ -26,18 +26,23 @@ class AdaptiveShell extends StatefulWidget {
class _AdaptiveShellState extends State<AdaptiveShell> {
late AppDestination _selected;
final Set<AppDestination> _visited = {};
@override
void initState() {
super.initState();
_selected = widget.destination ?? AppDestination.pipelines;
_visited.add(_selected);
}
@override
void didUpdateWidget(covariant AdaptiveShell oldWidget) {
super.didUpdateWidget(oldWidget);
final destination = widget.destination;
if (destination != null) _selected = destination;
if (destination != null) {
_selected = destination;
_visited.add(destination);
}
}
void _select(AppDestination destination) {
@@ -46,7 +51,10 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
callback(destination);
return;
}
setState(() => _selected = destination);
setState(() {
_selected = destination;
_visited.add(destination);
});
}
List<T> _items<T>(T Function(AppDestination) build) =>
@@ -60,9 +68,10 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
final item = destinationDetails(destination);
return KeyedSubtree(
key: ValueKey(destination),
child:
widget.destinationBodies[destination]?.call(context) ??
Center(child: Text('${item.label} — Not implemented')),
child: _visited.contains(destination)
? widget.destinationBodies[destination]?.call(context) ??
Center(child: Text('${item.label} — Not implemented'))
: const SizedBox.shrink(),
);
}).toList();
return LayoutBuilder(