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