DragEndDetails constructor

DragEndDetails(
  1. {Velocity velocity = Velocity.zero,
  2. double? primaryVelocity}
)

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,
}) : assert(
       primaryVelocity == null
         || (primaryVelocity == velocity.pixelsPerSecond.dx && velocity.pixelsPerSecond.dy == 0)
         || (primaryVelocity == velocity.pixelsPerSecond.dy && velocity.pixelsPerSecond.dx == 0),
     );