ScaleUpdateDetails constructor

ScaleUpdateDetails({
  1. Offset focalPoint = Offset.zero,
  2. Offset? localFocalPoint,
  3. double scale = 1.0,
  4. double horizontalScale = 1.0,
  5. double verticalScale = 1.0,
  6. double rotation = 0.0,
  7. int pointerCount = 0,
  8. Offset focalPointDelta = Offset.zero,
  9. Duration? sourceTimeStamp,
})

Creates details for GestureScaleUpdateCallback.

The scale, horizontalScale, and verticalScale arguments must be greater than or equal to zero.

Implementation

ScaleUpdateDetails({
  this.focalPoint = Offset.zero,
  Offset? localFocalPoint,
  this.scale = 1.0,
  this.horizontalScale = 1.0,
  this.verticalScale = 1.0,
  this.rotation = 0.0,
  this.pointerCount = 0,
  this.focalPointDelta = Offset.zero,
  this.sourceTimeStamp,
}) : assert(scale >= 0.0),
     assert(horizontalScale >= 0.0),
     assert(verticalScale >= 0.0),
     localFocalPoint = localFocalPoint ?? focalPoint;