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:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user