TapDragUpdateDetails constructor

TapDragUpdateDetails({
  1. Duration? sourceTimeStamp,
  2. Offset delta = Offset.zero,
  3. double? primaryDelta,
  4. required Offset globalPosition,
  5. PointerDeviceKind? kind,
  6. required Offset localPosition,
  7. required Offset offsetFromOrigin,
  8. required Offset localOffsetFromOrigin,
  9. required int consecutiveTapCount,
})

Creates details for a GestureTapDragUpdateCallback.

If primaryDelta is non-null, then its value must match one of the coordinates of delta and the other coordinate must be zero.

Implementation

TapDragUpdateDetails({
  this.sourceTimeStamp,
  this.delta = Offset.zero,
  this.primaryDelta,
  required this.globalPosition,
  this.kind,
  required this.localPosition,
  required this.offsetFromOrigin,
  required this.localOffsetFromOrigin,
  required this.consecutiveTapCount,
}) : assert(
       primaryDelta == null
         || (primaryDelta == delta.dx && delta.dy == 0.0)
         || (primaryDelta == delta.dy && delta.dx == 0.0),
     );