PointerScrollEvent constructor Null safety

const PointerScrollEvent(
  1. {Duration timeStamp = Duration.zero,
  2. PointerDeviceKind kind = PointerDeviceKind.mouse,
  3. int device = 0,
  4. Offset position = Offset.zero,
  5. Offset scrollDelta = Offset.zero,
  6. int embedderId = 0}
)

Creates a pointer scroll event.

All of the arguments must be non-null.

Implementation

const PointerScrollEvent({
  super.timeStamp,
  super.kind,
  super.device,
  super.position,
  this.scrollDelta = Offset.zero,
  super.embedderId,
}) : assert(timeStamp != null),
     assert(kind != null),
     assert(device != null),
     assert(position != null),
     assert(scrollDelta != null),
     assert(!identical(kind, PointerDeviceKind.trackpad));