Anchor desktop Files and Runs menus

Use Material popup menus for file actions and anchor Runs sorting choices to the sort button while retaining the phone fallback. Update callers, tests, and implementation notes to match the desktop behavior.
This commit is contained in:
2026-11-10 22:14:29 +00:00
parent 31f495fc18
commit 42a2378ecb
10 changed files with 73 additions and 194 deletions
+7 -14
View File
@@ -121,25 +121,18 @@ void main() {
await tester.pumpAndSettle();
expect(taps, 1);
// One overflow icon per host; the menu items keep their keys.
expect(
find.descendant(
of: find.byKey(const Key('menu')),
matching: find.byIcon(
cupertino ? CupertinoIcons.ellipsis : Icons.more_vert,
),
),
// The overflow control is the same Material menu on every host.
expect(
find.descendant(
of: find.byKey(const Key('menu')),
matching: find.byIcon(Icons.more_vert),
),
findsOneWidget,
);
await tester.tap(find.byKey(const Key('menu')));
await tester.pumpAndSettle();
expect(taps, 1, reason: 'the menu is its own control');
if (cupertino) {
expect(find.byType(CupertinoActionSheet), findsOneWidget);
expect(find.text('Cancel'), findsOneWidget);
} else {
expect(find.byType(PopupMenuItem<String>), findsNWidgets(2));
}
expect(find.byType(PopupMenuItem<String>), findsNWidgets(2));
await tester.tap(find.byKey(const Key('menu-delete')));
await tester.pumpAndSettle();
expect(picked, 'delete');