Connect independent resizable chat panes with routed focus and narrow layouts
This commit is contained in:
@@ -209,6 +209,7 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
|
||||
split: () => _bar.split(_selected),
|
||||
preferredWidth: () => _paneWidths.widthFor(_selected.name),
|
||||
bar: currentBar,
|
||||
visible: () => !(_bar.specFor(_selected)?.barless ?? false),
|
||||
);
|
||||
// The scaffolds below swap the system insets for their bars'
|
||||
// heights; panes beside a list read the real ones from here.
|
||||
@@ -393,6 +394,7 @@ class _ListPaneBar extends StatelessWidget
|
||||
required this.split,
|
||||
required this.preferredWidth,
|
||||
required this.bar,
|
||||
required this.visible,
|
||||
});
|
||||
|
||||
final Listenable listenable;
|
||||
@@ -400,6 +402,7 @@ class _ListPaneBar extends StatelessWidget
|
||||
final bool Function() split;
|
||||
final double? Function() preferredWidth;
|
||||
final SegmentedBar Function() bar;
|
||||
final bool Function() visible;
|
||||
|
||||
@override
|
||||
Size get preferredSize => initial.preferredSize;
|
||||
@@ -411,11 +414,13 @@ class _ListPaneBar extends StatelessWidget
|
||||
@override
|
||||
Widget build(BuildContext context) => ListenableBuilder(
|
||||
listenable: listenable,
|
||||
builder: (context, _) => ListPaneWidth(
|
||||
split: split(),
|
||||
preferredWidth: preferredWidth(),
|
||||
alignment: AlignmentDirectional.topStart,
|
||||
child: bar(),
|
||||
),
|
||||
builder: (context, _) => !visible()
|
||||
? const SizedBox.shrink()
|
||||
: ListPaneWidth(
|
||||
split: split(),
|
||||
preferredWidth: preferredWidth(),
|
||||
alignment: AlignmentDirectional.topStart,
|
||||
child: bar(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user