Flutter- GestureDetector not working with containers in stack

前端 未结 10 854
一生所求
一生所求 2020-12-28 12:14

I have two containers in a stack and both containers have GestureDetector.The OnTap for the first container is working fine but it\'s not working with another container. The

10条回答
  •  半阙折子戏
    2020-12-28 12:53

    For me it was an issue with items overflowing outside a Stack, with clipBehavior: Clip.none.

    In that case the item is visible but not touchable. So I updated my layout to remove the clipBehavior: Clip.none on my Stack and the GestureDetector started working.

提交回复
热议问题