down method

PointerDownEvent down(
  1. Offset newLocation, {
  2. Duration timeStamp = Duration.zero,
  3. int? buttons,
})

Create a PointerDownEvent at the given location.

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

By default, the set of buttons in the last down or move event is used. You can give a specific set of buttons by passing the buttons argument.

Implementation

PointerDownEvent down(
  Offset newLocation, {
  Duration timeStamp = Duration.zero,
  int? buttons,
}) {
  assert(!isDown);
  assert(!isPanZoomActive);
  _isDown = true;
  _location = newLocation;
  if (buttons != null) {
    _buttons = buttons;
  }
  return PointerDownEvent(
    timeStamp: timeStamp,
    kind: kind,
    device: _device,
    pointer: pointer,
    position: location!,
    buttons: _buttons,
  );
}