changeState method

void changeState(
  1. CallState state
)

Primary State Change Method - Use This Instead of Direct Assignment

This method is the single source of truth for all call state changes. It updates the call's state and ensures the callback is triggered.

@param state - The new CallState to transition to

Implementation

void changeState(CallState state) {
  call?.callState = state;
  onCallStateChanged(state);
}