Open kristijorgji opened 9 months ago
The current API design is not very good.
You can see https://github.com/huhuang03/reorderable_grid_view/blob/master/example/lib/demo/demo_custom.dart.
The key is:
ReorderableItemView
ReorderableItemView
index param shoud in order for all ReorderableItemView
items.@huhuang03 thanks a lot for the reply.
I checked the provided code but don't understand how to disable from the d&d mechanism a particular index.
Let say I want indeces 2,4 from my 9 items grid (0-8) to be disabled (not draggable, not targets and not moving around when other items drag and drop)
How can I do that ?
Hello. you can try version 2.2.9-alpha.1
. And do like https://github.com/huhuang03/reorderable_grid_view/blob/555e135b1b79c7bc21bd2cd7fc691f6cd9effbfa/example/lib/demo/demo_drag_enable_config.dart.
Hi,
we have a grid of 12 items, some of them have photos other are empty.
We want to allow only the items that have photos to be draggable and dropped only on other items that have photos as well!
Items that are just placeholders shouldn't move or be draggable. (example while uploading photos in dating or social apps like Tinder)
How to achieve this? (we know the indexes of the items that are empty and want to disable from the drag&drop mechanism)