TestPointer class

A class for generating coherent artificial pointer events.

You can use this to manually simulate individual events, but the simplest way to generate coherent gestures is to use TestGesture.


TestPointer([int pointer = 1, PointerDeviceKind kind = PointerDeviceKind.touch ])
Creates a TestPointer. By default, the pointer identifier used is 1, however this can be overridden by providing an argument to the constructor. [...]


isDown bool
Whether the pointer simulated by this object is currently down. [...]
kind PointerDeviceKind
The kind of pointer device to simulate. Defaults to PointerDeviceKind.touch.
location Offset
The position of the last event sent by this object. [...]
pointer int
The pointer identifier used for events generated by this object. [...]
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


cancel({Duration timeStamp: Duration.zero }) PointerCancelEvent
Create a PointerCancelEvent. [...]
down(Offset newLocation, { Duration timeStamp: Duration.zero }) PointerDownEvent
Create a PointerDownEvent at the given location. [...]
hover(Offset newLocation, { Duration timeStamp: Duration.zero }) PointerHoverEvent
Create a PointerHoverEvent to the given location. [...]
move(Offset newLocation, { Duration timeStamp: Duration.zero }) PointerMoveEvent
Create a PointerMoveEvent to the given location. [...]
scroll(Offset scrollDelta, { Duration timeStamp: Duration.zero }) PointerScrollEvent
Create a PointerScrollEvent (e.g., scroll wheel scroll; not finger-drag scroll) with the given delta. [...]
setDownInfo(PointerEvent event, Offset newLocation) bool
If a custom event is created outside of this class, this function is used to set the isDown.
up({Duration timeStamp: Duration.zero }) PointerUpEvent
Create a PointerUpEvent. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toString() String
Returns a string representation of this object.


operator ==(dynamic other) bool
The equality operator. [...]