For me the issue was due to the use of SafeArea over GestureDetector which was inside Stack. I was able to resolve the issue by removing the SafeArea and adding padding using MediaQuery.of(context).viewPadding.top.