directionalDown method
void
directionalDown(
- int pointer,
- Offset localPosition
)
Implementation
void directionalDown(int pointer, Offset localPosition) {
if (_backgroundRect == null) return;
final pos = getViewportPosition(localPosition);
_updateDirectionalRect(pos);
_backgroundRect?.let((backgroundRect) {
Rect directional = Rect.fromLTWH(
backgroundRect.left - 50,
backgroundRect.top - 50,
backgroundRect.width + 100,
backgroundRect.height + 100,
);
if (!_dragging && directional.contains(pos)) {
_dragging = true;
_dragPosition = pos;
_pointerDragging = pointer;
}
});
}