Use proper phone sheets for chat and Files menus

On phones the chat's More menu, chat list rows and Files entries open a
Material bottom sheet headed by the chat or file, with full-width icon
rows and destructive actions last in the error colour; desktop menus
show icons, a minimum width and destructive actions after a divider.
The chat menu drops Run command and Open chats, keeps a single terminal
entry and lists Close pane last.
This commit is contained in:
2026-11-13 01:14:12 +00:00
parent 26e68140fd
commit 046de9db4d
18 changed files with 668 additions and 126 deletions
+8 -2
View File
@@ -106,7 +106,7 @@ void main() {
await tester.pumpAndSettle();
expect(taps, 1);
// The overflow control is a Material menu.
// The overflow control opens a phone's bottom sheet at this width.
expect(
find.descendant(
of: find.byKey(const Key('menu')),
@@ -117,7 +117,13 @@ void main() {
await tester.tap(find.byKey(const Key('menu')));
await tester.pumpAndSettle();
expect(taps, 1, reason: 'the menu is its own control');
expect(find.byType(PopupMenuItem<String>), findsNWidgets(2));
expect(
find.descendant(
of: find.byType(BottomSheet),
matching: find.byType(ListTile),
),
findsNWidgets(2),
);
await tester.tap(find.byKey(const Key('menu-delete')));
await tester.pumpAndSettle();
expect(picked, 'delete');