onHoldUnholdPressed method

void onHoldUnholdPressed()

Either places the call on hold, or unholds the call based on the current hold state.

Implementation

void onHoldUnholdPressed() {
  if (onHold) {
    _sendHoldModifier('unhold');
    onHold = false;
    callHandler.changeState(CallState.active, this);
  } else {
    _sendHoldModifier('hold');
    onHold = true;
    callHandler.changeState(CallState.held, this);
  }
}