addPointer method

PointerAddedEvent addPointer({
  1. Duration timeStamp = Duration.zero,
  2. Offset? location,
})

Create a PointerAddedEvent with the PointerDeviceKind the pointer was created with.

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

Implementation

PointerAddedEvent addPointer({
  Duration timeStamp = Duration.zero,
  Offset? location,
}) {
  _location = location ?? _location;
  return PointerAddedEvent(
    timeStamp: timeStamp,
    kind: kind,
    device: _device,
    position: _location ?? Offset.zero,
  );
}