actionDown method

void actionDown(
  1. int pointer,
  2. Offset localPosition
)

Implementation

void actionDown(int pointer, Offset localPosition) {
  if (!_dragging && _rect != null && _rect!.contains(localPosition)) {
    _pointer = pointer;
    if (enableDirection) {
      _dragPosition = localPosition;
      _dragging = true;
    }
    _joystickController?.joystickAction(
      JoystickActionEvent(
        id: actionId,
        event: ActionEvent.DOWN,
      ),
    );
    pressed();
  }
}