DragStartDetails constructor Null safety

DragStartDetails(
  1. {Duration? sourceTimeStamp,
  2. Offset globalPosition,
  3. Offset? localPosition,
  4. PointerDeviceKind? kind}
)

Creates details for a GestureDragStartCallback.

The globalPosition argument must not be null.

Implementation

DragStartDetails({
  this.sourceTimeStamp,
  this.globalPosition = Offset.zero,
  Offset? localPosition,
  this.kind,
}) : assert(globalPosition != null),
     localPosition = localPosition ?? globalPosition;