widget library

Tickki Chat SDK for Flutter — drop-in widget.

Importing this file gives you a complete, ready-to-show chat screen. Colors, welcome copy, and feature flags are auto-fetched from the Tickki backend (GET /api/v1/chat/config) so a business owner controls branding from the Tickki dashboard — your app doesn't have to know the colors.

import 'package:tickki_chat_flutter/widget.dart';

// One-time at app start:
final tickki = TickkiChat(publishableKey: 'pk_live_…');

// Anywhere you want to open the chat:
TickkiChatWidget.show(context, client: tickki, visitorId: 'user_8432');

For complete UI control instead, use the headless surface from package:tickki_chat_flutter/tickki_chat_flutter.dart only.

Classes

BrandingInfo
BusinessInfo
ChatConfig
Branding + feature flags + presence returned by GET /chat/config.
ChatMessage
One message in a conversation. direction == 'inbound' was sent by the visitor (your user); 'outbound' was sent by an agent.
ChatSession
A live chat session bound to one conversation. Returned from TickkiChat.startSession. Holds the session token internally and exposes the REST + realtime primitives the SDK consumer needs.
FeaturesInfo
LimitsInfo
MessageAttachment
MessagePage
A paginated slice of messages — what GET /sessions/{id}/messages returns. nextCursor is null when there is no older page.
RealtimeConfig
Server-issued realtime config returned alongside a newly-started session. Hand straight to the Pusher / Reverb client.
StartSessionResponse
What POST /chat/sessions returns. The sessionToken field is shown to the caller exactly once — persist it in memory for the lifetime of the chat.
TickkiAnalytics
Analytics surface for the Tickki Chat SDK.
TickkiAnalyticsNavigatorObserver
NavigatorObserver that emits a screen_view event whenever the app pushes or replaces a route. Wire it up once on MaterialApp. navigatorObservers and the SDK records every navigation automatically — no per-screen instrumentation needed.
TickkiAnalyticsScope
Root-level wrapper that:
TickkiChat
Entry point for the Tickki Chat SDK.
TickkiChatStrings
All user-facing copy in the drop-in chat widget. Override for i18n by passing a populated instance to TickkiChatWidget.show.
TickkiChatWidget
Drop-in chat screen. Opening it pushes a full-screen route that fetches branding, starts (or resumes) a session, subscribes to realtime updates, and renders a complete chat UI.
TickkiIgnore
Wrap a subtree that you don't want the ambient tap listener to observe — typically password fields, payment forms, or anything privacy-sensitive. Has no effect on explicit track calls or on TickkiTrackable usage inside the subtree.
TickkiTrackable
One-line wrapper that emits a named tap event when the child is tapped. Use this on buttons / clickable rows you care about analytically — leave the rest to ambient capture from TickkiAnalyticsScope.

Exceptions / Errors

TickkiChatException
Exception thrown by every Tickki Chat SDK call. All HTTP and realtime failures surface as one of these — branch on code for programmatic handling and use message for logs / dev tools.