so the main issue is CompositedTransformFollower.
CompositedTransformFollower basically separates the widget from its actual place in the render tree and visually only shows it on the screen, but:
If its parent doesn't have enough space, or the Stack doesn't allow for a full height, or the menu is placed in an area outside the bounds of the parent,
the height won't reach that area at all and that makes the buttons "apparent" but not working tho.
best way in my oponion to solve this is to use OverlayEntry:
OverlayEntry? _overlayEntry;
void _toggleMenu() {
if (_overlayEntry != null) {
_overlayEntry!.remove();
_overlayEntry = null;
return;
}
final overlay = Overlay.of(context);
final renderBox = context.findRenderObject() as RenderBox;
final size = renderBox.size;
final offset = renderBox.localToGlobal(Offset.zero);
_overlayEntry = OverlayEntry(
builder: (context) => Positioned(
left: offset.dx - 40,
top: offset.dy + size.height + 5,
child: Material(
color: Colors.transparent,
child: EditMenu(delete: widget.delete),
),
),
);
overlay.insert(_overlayEntry!);
}
@override
Widget build(BuildContext context) {
return IconButton(
icon: Icon(Icons.more_vert),
onPressed: _toggleMenu,
);
}