onDragUpdate property

(Offset Function(Offset currentPosition, Offset nextPosition)?) onDragUpdate
final

Callback called on each position update - usefull for collision checks

It takes the current position and the candidate new one and should return the real next position. If null, the candidate next position is simply used.

Implementation

final Offset Function(
  Offset currentPosition,
  Offset nextPosition,
)? onDragUpdate;