scroll method

PointerScrollEvent scroll(
  1. Offset scrollDelta, {
  2. Duration timeStamp = Duration.zero,
  3. RespondPointerEventCallback? onRespond,
})

Create a PointerScrollEvent (e.g., scroll wheel scroll; not finger-drag scroll) with the given delta.

By default, the time stamp on the event is Duration.zero. You can give a specific time stamp by passing the timeStamp argument.

Implementation

PointerScrollEvent scroll(
  Offset scrollDelta, {
  Duration timeStamp = Duration.zero,
  RespondPointerEventCallback? onRespond,
}) {
  assert(kind != PointerDeviceKind.touch, "Touch pointers can't generate pointer signal events");
  assert(location != null);
  return PointerScrollEvent(
    timeStamp: timeStamp,
    kind: kind,
    device: _device,
    position: location!,
    scrollDelta: scrollDelta,
    onRespond: onRespond,
  );
}