TestPointer constructor
- int pointer = 1,
- PointerDeviceKind kind = PointerDeviceKind.touch,
- int? device,
- int buttons = kPrimaryButton,
Creates a TestPointer. By default, the pointer identifier used is 1, however this can be overridden by providing an argument to the constructor.
Multiple TestPointers created with the same pointer identifier will interfere with each other if they are used in parallel.
Implementation
TestPointer([
this.pointer = 1,
this.kind = PointerDeviceKind.touch,
int? device,
int buttons = kPrimaryButton,
]) : _buttons = buttons {
switch (kind) {
case PointerDeviceKind.mouse:
_device = device ?? 1;
case PointerDeviceKind.stylus:
case PointerDeviceKind.invertedStylus:
case PointerDeviceKind.touch:
case PointerDeviceKind.trackpad:
case PointerDeviceKind.unknown:
_device = device ?? 0;
}
}