addPointer method

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

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

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


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