Our flutter application deploys to both Android and iPhone. On Android the (predictive) back gesture can be triggered by swiping from either the left or right edge of the phone towards the other side.
In my flutter app, I would like to know which direction the user swiped in order to initiate the back gesture. Is this possible? How?
For additional context, whether it's a good user experience or not, the reason I'm looking for the swipe direction is because the business has decided they want to allow the back gesture if it is initiated from one of the edges, but disallow it if initiated from the other edge. So I'm wanting to access the gesture swipe direction from within the PopScope
widget's onPopInvokedWithResult
method.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744959056a4603377.html
评论列表(0条)