Flutter- GestureDetector not working with containers in stack

前端 未结 10 861
一生所求
一生所求 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:33

    Because of stack..There are some widget on your GestureDetector.

    Solution:

    Stack(
            children: [
                  ...//Other widgets,
                  GestureDetector()
            ]
    

提交回复
热议问题