feat(app): an open pipeline, run or chat fills a phone screen; Back steps up one level; stage tabs end with Session
This commit is contained in:
@@ -15,6 +15,7 @@ class AdaptiveShell extends StatefulWidget {
|
||||
this.onDestinationSelected,
|
||||
this.onSearch,
|
||||
this.attentionCount = 0,
|
||||
this.detailOpen = false,
|
||||
});
|
||||
|
||||
final Map<AppDestination, WidgetBuilder> destinationBodies;
|
||||
@@ -33,6 +34,10 @@ class AdaptiveShell extends StatefulWidget {
|
||||
/// so it stays visible from any destination. Zero shows no badge.
|
||||
final int attentionCount;
|
||||
|
||||
/// A pipeline, run or chat is open: on a phone it takes the whole screen,
|
||||
/// like its own page, and the destination bar steps aside until Back.
|
||||
final bool detailOpen;
|
||||
|
||||
@override
|
||||
State<AdaptiveShell> createState() => _AdaptiveShellState();
|
||||
}
|
||||
@@ -183,18 +188,19 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
|
||||
: Column(
|
||||
children: [
|
||||
Expanded(child: _destinationStack(contents, index)),
|
||||
CupertinoTabBar(
|
||||
currentIndex: index,
|
||||
onTap: (value) =>
|
||||
_select(AppDestination.values[value]),
|
||||
items: _items((destination) {
|
||||
final item = destinationDetails(destination);
|
||||
return BottomNavigationBarItem(
|
||||
icon: _icon(destination, item.cupertinoIcon),
|
||||
label: item.label,
|
||||
);
|
||||
}),
|
||||
),
|
||||
if (!widget.detailOpen)
|
||||
CupertinoTabBar(
|
||||
currentIndex: index,
|
||||
onTap: (value) =>
|
||||
_select(AppDestination.values[value]),
|
||||
items: _items((destination) {
|
||||
final item = destinationDetails(destination);
|
||||
return BottomNavigationBarItem(
|
||||
icon: _icon(destination, item.cupertinoIcon),
|
||||
label: item.label,
|
||||
);
|
||||
}),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -250,7 +256,7 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
|
||||
Expanded(child: _destinationStack(contents, index)),
|
||||
],
|
||||
),
|
||||
bottomNavigationBar: wide
|
||||
bottomNavigationBar: wide || widget.detailOpen
|
||||
? null
|
||||
: NavigationBar(
|
||||
selectedIndex: index,
|
||||
|
||||
Reference in New Issue
Block a user