Prerequisites
- An active call session
- Access to the
CallSessioninstance
Get CallSession Instance
Session control methods are called on theCallSession singleton:
CallSession.getInstance() returns null if no active session exists. Always use the null-aware ?. operator when calling methods.Check Session Status
Check if there is currently an active call session.| Return Type | Description |
|---|---|
bool? | true if a session is active, false otherwise, null if no instance |
Use this method to check session status before calling other
CallSession methods, or to determine if you need to show call UI.Leave Session
End your participation in the current call session.When you leave the session, the
onSessionLeft() callback is triggered on your SessionStatusListener. Other participants will receive the onParticipantLeft(Participant) callback.Handling Session End
Flutter listeners are not lifecycle-aware. You must manually remove listeners in your widget’s
dispose() method to prevent memory leaks.End Call Session
Alias forleaveSession(). Ends your participation and disconnects gracefully.
Raise Hand
Raise your hand to get attention from other participants. This is useful in meetings or webinars when you want to ask a question or make a comment.When you raise your hand, all participants receive the
onParticipantHandRaised(Participant) callback on their ParticipantEventListener.Lower Hand
Lower your previously raised hand.When you lower your hand, all participants receive the
onParticipantHandLowered(Participant) callback on their ParticipantEventListener.Listen for Hand Raise Events
Register aParticipantEventListener to receive callbacks when participants raise or lower their hands:
Button Click Listeners
Listen for when users tap the leave or raise hand buttons:Hide Session Control Buttons
Control the visibility of session control buttons in the UI:Session Timeout
Configure the idle timeout period for when you’re alone in a session:onSessionTimedOut() callback is triggered:
Next Steps
Session Status Listener
Handle all session lifecycle events
Button Click Listener
Handle all button click events