Use proper sort icon in file explorer

Give the FilesHeader sort control a recognizable Material sort glyph while preserving the default overflow icon for other menus. Add focused widget coverage for sort key and direction behavior.
This commit is contained in:
2026-11-11 19:41:20 +00:00
parent 3da71c3053
commit 6cacd11c6b
4 changed files with 43 additions and 1 deletions
@@ -82,6 +82,7 @@ class FilesHeader extends StatelessWidget {
),
AppOverflowMenu<FilesSortKey>(
label: 'Sort',
icon: const Icon(Icons.sort),
onSelected: (_, key) =>
controller.setSort(controller.sort.reverseOr(key)),
actions: [
+6 -1
View File
@@ -33,6 +33,7 @@ class AppOverflowMenu<T> extends StatelessWidget {
this.label = 'More actions',
this.sheetTitle,
this.enabled = true,
this.icon = const Icon(Icons.more_vert),
});
final List<AppMenuAction<T>> actions;
@@ -48,6 +49,10 @@ class AppOverflowMenu<T> extends StatelessWidget {
final bool enabled;
/// The button glyph. Most callers use the default overflow icon; controls
/// whose action has a distinct meaning can provide a matching Material icon.
final Widget icon;
@override
Widget build(BuildContext context) {
if (actions.isEmpty) return const SizedBox.shrink();
@@ -57,7 +62,7 @@ class AppOverflowMenu<T> extends StatelessWidget {
child: Material(
type: MaterialType.transparency,
child: PopupMenuButton<T>(
icon: const Icon(Icons.more_vert),
icon: icon,
tooltip: label,
enabled: enabled,
onSelected: (value) => onSelected(context, value),