Overview
Custom control panels allow you to:- Match your app’s branding and design language
- Simplify the interface by showing only relevant controls
- Add custom functionality and workflows
- Create unique user experiences
- Mute/Unmute audio button
- Pause/Resume video button
- Switch camera button
- End call button
Prerequisites
- CometChat Calls SDK installed and initialized
- Active call session (see Join Session)
- Familiarity with Actions and Events
Step 1: Hide Default Controls
Configure your session settings to hide the default control panel:You can also hide individual buttons while keeping the control panel visible. See SessionSettingsBuilder for all options.
Step 2: Create Custom Widget Layout
Build a Flutter widget for your custom controls. Instead of XML layouts, Flutter uses a widget tree to compose the UI:Step 3: Implement Control Actions
Wire up the button callbacks to call the appropriateCallSession actions:
Step 4: Handle State Updates
UseMediaEventsListener to keep your UI synchronized with the actual call state.
Flutter listeners are not lifecycle-aware. You must manually remove listeners in
dispose() to prevent memory leaks.SessionStatusListener to handle session end events: