DragEndDetails constructor
Creates details for a GestureDragEndCallback.
If primaryVelocity is non-null, its value must match one of the
coordinates of velocity.pixelsPerSecond
and the other coordinate
must be zero.
Implementation
DragEndDetails({
this.velocity = Velocity.zero,
this.primaryVelocity,
this.globalPosition = Offset.zero,
Offset? localPosition,
}) : assert(
primaryVelocity == null
|| (primaryVelocity == velocity.pixelsPerSecond.dx && velocity.pixelsPerSecond.dy == 0)
|| (primaryVelocity == velocity.pixelsPerSecond.dy && velocity.pixelsPerSecond.dx == 0),
),
localPosition = localPosition ?? globalPosition;