callHandler property
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 directcallStateassignment - 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 toCallState.doneonHoldUnholdPressed()method: Toggles betweenCallState.activeandCallState.held
Implementation
late CallHandler callHandler;