knopp / flutter_reorderable_list

ReorderableList for Flutter
BSD 3-Clause "New" or "Revised" License
335 stars 98 forks source link

onReorder not called with moving item key as target #30

Open C-gotoh opened 3 years ago

C-gotoh commented 3 years ago

I want to process the onReorderDone callback once and send a backend request with the final move operation, therefore I keep track of the item indices (derived from the item keys) during the onReorder callbacks.

The problem is that the onReorder never gets called with the original item key as second parameter, when the moving item is dragged over its placeholder. So I can not detect this state, where the item should not be moved at all during the onReorderDone callback. This is because the most recent onReorder callback produced a movement operation either one above or below the currently moving item.

Is it possible to achieve this behaviour, and if not what would break?