acceptGesture method

  1. @override
void acceptGesture(
  1. int pointer
)
override

Called when this member wins the arena for the given pointer id.

Implementation

@override
void acceptGesture(int pointer) {
  if (_state == _ForceState.possible) {
    _state = _ForceState.accepted;
  }

  if (onStart != null && _state == _ForceState.started) {
    invokeCallback<void>(
      'onStart',
      () => onStart!(
        ForcePressDetails(
          pressure: _lastPressure,
          globalPosition: _lastPosition.global,
          localPosition: _lastPosition.local,
        ),
      ),
    );
  }
}