Skip to main content

UI Customization (PitelUIConfig)

🎨 UI Customization (PitelUIConfig)​

Customize the native call screen colors, labels, and action buttons anytime at runtime using client.setUIConfig(uiConfig).

Call setUIConfig() independently whenever your app initializes or when the user switches languages/themes. This decouples UI presentation completely from SIP registration:

// Call at app startup or when switching language/theme:
await client.setUIConfig(PitelUIConfig(
colors: PitelUIColors(
background: '#6C7BF4',
textPrimary: '#1A1F36',
hangupButtonBackground: '#E53935',
),
texts: PitelUITexts(
incoming: 'Cuộc gọi đến...',
outgoing: 'Cuộc gọi đi...',
connected: 'Đang đàm thoại',
connecting: 'Đang kết nối...',
mute: 'Tắt mic',
unmute: 'Bật mic',
speaker: 'Loa ngoài',
hold: 'Giữ máy',
unhold: 'Bỏ giữ',
endCall: 'Gác máy',
),
visibility: PitelUIVisibility(showHoldButton: true),
));
TIP

The SDK automatically caches uiConfig locally. autoLogin() restores this custom configuration on app restart, and runtime updates take effect immediately without requiring SIP re-registration.

(Optional / Backward compatibility): You can still provide uiConfig inside PitelSettings when calling client.login(PitelSettings(..., uiConfig: uiConfig)).

Values in PitelUIColors and PitelUITexts are nullable overrides. If omitted, the native platform preset is used; the Dart model does not define a single cross-platform default. The snippet shows sample overrides.

UI Config Parameters Reference​

Colors (PitelUIColors)​

Color strings use #RRGGBB or #AARRGGBB (alpha first). For example, #806C7BF4 is the blue #6C7BF4 at 50% opacity. Six-digit colors are treated as fully opaque. Invalid values fall back to native presets.

Dart fieldAndroid effectiOS effectExample value
backgroundCall screen backgroundCall screen background#6C7BF4
cardBackgroundAction card backgroundAction card background#FFFFFF
dialPadBackgroundNot mappedDial-pad screen background#FFFFFF
textPrimaryCaller and action-label textCaller name#1A1F36
textSecondaryNot mappedTimer and secondary/dial-pad hint text#4A5568
textStatusNot mappedCall status label#FFFFFF
buttonIconActive, buttonIconInactiveAction icons and labelsAction icons and labels#6C7BF4, #1A1F36
buttonBackgroundActive, buttonBackgroundInactiveAction button backgroundsAction button backgrounds; active background also affects dial-pad keys#806C7BF4, #26000000
hangupButtonBackgroundHangup and decline buttonsHangup and dial-pad action button#FFE53935
hangupButtonIconNot mappedHangup/dial-pad action icon#FFFFFFFF
dialPadNumber, dialPadLetters, dialPadButtonBackgroundNot mappedDial-pad digits, letters and key background#FF1A1F36, #FF718096, #00000000
actionButtonGradientNot mappedTransfer action gradient['#FF2E7D32', '#FF1B5E20']

Texts (PitelUITexts)​

Dart fieldsAndroid effectiOS effect
incoming, outgoing, connectingCall screen / incoming notification textSDK call screen status
connected, endCallActive/disconnected call statusAccepted by the bridge/config model, but not currently rendered by the iOS call view
transferCallTitle, keypadTitleOngoing-call notification title/body; these do not title the transfer or keypad screenAccepted by the bridge/config model, but not currently rendered by the iOS call or dial-pad view
accept, declineIncoming-call action labelsNot mapped; system CallKit labels are controlled by iOS
unknownCaller, mute, unmute, speaker, hold, unhold, keypad, transfer, enterNumberNot mappedUsed in SDK-controlled call/dial-pad UI

Visibility (PitelUIVisibility)​

Dart fieldsAndroid effectiOS effect
showKeypadByDefault, showTransferButton, showHoldButton, showMuteButton, showSpeakerButtonControls corresponding SDK call-screen controlsNot applied by the current Flutter iOS plugin

A field listed as accepted but not rendered has no visible effect at that location in the current native UI. UI customization only affects SDK-controlled screens; it cannot rename controls in the system CallKit interface. Verify every field you rely on on each target platform because native presets and layouts differ.