notifyDragEnd method

void notifyDragEnd(
  1. int fromListIndex,
  2. int fromItemIndex,
  3. int toListIndex,
  4. int toItemIndex,
)

Notifies about drag end

Implementation

void notifyDragEnd(int fromListIndex, int fromItemIndex, int toListIndex, int toItemIndex) {
  if (_isDisposed) return;
  _callbacks?.onDragEnd?.call(fromListIndex, fromItemIndex, toListIndex, toItemIndex);

  // Also call more specific callbacks
  if (fromListIndex == toListIndex) {
    _callbacks?.onItemReorder?.call(fromListIndex, fromItemIndex, toItemIndex);
  } else {
    _callbacks?.onItemMove?.call(fromListIndex, fromItemIndex, toListIndex, toItemIndex);
  }
}