#277 filter chip long press menu shows full label

This commit is contained in:
Thibault Deckers 2022-07-19 15:41:36 +02:00
parent 9c61857f9d
commit 04fefd06ba

View file

@ -108,14 +108,18 @@ class AvesFilterChip extends StatefulWidget {
final selectedAction = await showMenu<ChipAction>(
context: context,
position: RelativeRect.fromRect(tapPosition & touchArea, Offset.zero & overlay.size),
items: actions
.map((action) => PopupMenuItem(
value: action,
child: MenuIconTheme(
child: MenuRow(text: action.getText(context), icon: action.getIcon()),
),
))
.toList(),
items: [
PopupMenuItem(
child: Text(filter.getLabel(context)),
),
const PopupMenuDivider(),
...actions.map((action) => PopupMenuItem(
value: action,
child: MenuIconTheme(
child: MenuRow(text: action.getText(context), icon: action.getIcon()),
),
)),
],
);
if (selectedAction != null) {
// wait for the popup menu to hide before proceeding with the action