onPanUpdate method

dynamic onPanUpdate(
  1. DragUpdateDetails _
)

Implementation

onPanUpdate(DragUpdateDetails _) {
  if (pickUp != null) {
    // print('panUpdate ${_.delta}');
    final rect = pickUp!.key.currentState!.rect;
    pickUp!.key.currentState?.rect = Rect.fromLTWH(
      rect.left + _.delta.dx,
      rect.top + _.delta.dy,
      rect.width,
      rect.height,
    );

    final entryIndex = findSlotByOffset(_.globalPosition);
    if (entryIndex != -1) {
      final entry = _relationship.entries.elementAt(entryIndex);
      final slot = entry.key;
      if (slot != _fromSlot) {
        _dragTo(slot);
      }
    }
  }
}