handlerPointerUp method
Implementation
@override
bool handlerPointerUp(PointerUpEvent event) {
final pointer = event.pointer;
final position = event.localPosition.toVector2();
if (enableTab && pointer == _pointer && hasGameRef) {
if (isHud) {
if (containsPoint(position)) {
onTapUp(pointer, position);
onTap();
} else {
onTapCancel();
}
} else {
final absolutePosition = gameRef.screenToWorld(position);
if (containsPoint(absolutePosition)) {
onTapUp(pointer, position);
onTap();
} else {
onTapCancel();
}
}
_pointer = -1;
}
return super.handlerPointerUp(event);
}