Is there any way to lock an item?
thuanlegit opened this issue · comments
Need this too.
I think the easiest way to do this would be to intercept the Gesture events on that widget.
One way to do this is to wrap it in a
Listener(
behavior: HitTestBehavior.opaque,
...
)
+1
I think the easiest way to do this would be to intercept the Gesture events on that widget.
One way to do this is to wrap it in a
Listener( behavior: HitTestBehavior.opaque, ... )
The issue with this solution is that it doesn't prevent the locked item from moving when other items are moving nearby. Also, those are typically buttons, so we need to have the ability to tap on them, etc. We are currently using fork from open PR + workaround, but if you don't want to break the contract with Flutter SDK widgets - maybe you can just create an inherited "extended" class on top of ReorderableGrid
with additional features? Thanks anyway!
I think the easiest way to do this would be to intercept the Gesture events on that widget.
One way to do this is to wrap it in aListener( behavior: HitTestBehavior.opaque, ... )The issue with this solution is that it doesn't prevent the locked item from moving when other items are moving nearby. Also, those are typically buttons, so we need to have the ability to tap on them, etc. We are currently using fork from open PR + workaround, but if you don't want to break the contract with Flutter SDK widgets - maybe you can just create an inherited "extended" class on top of
ReorderableGrid
with additional features? Thanks anyway!
I added this feature to ReorderableGridView with some modifications, available in 1.0.8
Heyy :)
#25 only locks the item from not being dragged, doesn't it? It can still get "pushed" (temporarily repositioned) when dragging another item around