hcbpassos / drag_select_grid_view

A grid that supports both dragging and tapping to select its items.
BSD 2-Clause "Simplified" License
133 stars 34 forks source link

about pop twice after selecting cause some problems #30

Open mnba3223 opened 2 years ago

mnba3223 commented 2 years ago

HI, I am new to flutter and have some question about the pop twice after selecting. I know when select the grid with longpress will in drag_select mode, but there's not have a onTap to switch on it. To solve it I use another GestureDetector with onTap to separated those two function and it work fine on select grid.

onTap like this GestureDetector( onTap: () { widget.selectedImages(widget.url); debugPrint(" ${widget.isSelected}"); debugPrint(" ${scaleAnimation.value}"); }, ),

But because onTap don't need to pop twice, when I use cancel button, I can't know which is onTap, which is longpress.

  1. How do I know the drag_select mode is trigger or not ? Beacause If I knew, I can pop When I want.

And how to I return itembuilder status to the father layer?

  1. Another question is about scroll, I use SmartRefresher now, and if I add a DragSelectGridView in SmartRefresher child, the Refresher will not work. And if I add nerverScrollPhysis on DragSelectGridView, it can refresh widget but can't scroll the grid.

If you read this, I will appreciate you. Thank you for your reading.

vontdeux commented 1 year ago

did you manage to found a workaround for this?

mnba3223 commented 1 year ago

did you manage to found a workaround for this?

no, I keep onTap select function, not use this package, sorry for that I don't have time to fix this problem.