callHandler property

CallHandler callHandler
getter/setter pair

CallHandler Instance - Single Source of Truth for State Management

This is the authoritative state manager for this Call instance. All call state changes MUST go through this handler to ensure proper state transitions and callback execution.

Usage:

  • Use callHandler.changeState(newState) instead of direct callState assignment
  • Automatically triggers registered callbacks when state changes occur
  • Ensures consistent state management across the entire SDK

State Change Locations in this Class:

  • endCall() method: Sets state to CallState.done
  • onHoldUnholdPressed() method: Toggles between CallState.active and CallState.held

Implementation

late CallHandler callHandler;