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 directcallState
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 toCallState.done
onHoldUnholdPressed()
method: Toggles betweenCallState.active
andCallState.held
Implementation
late CallHandler callHandler;