mysampark_chat library

Official MySampark Chat Widget for Flutter.

Add AI-powered live chat with human agent takeover, typing indicators, lead forms, and real-time WebSocket support to any Flutter app.

import 'package:mysampark_chat/mysampark_chat.dart';

See MySamparkChatBubble for a persistent floating launcher, or MySamparkChatScreen to open the chat as a full screen / bottom sheet.

Classes

ChatAgent
The human support agent handling a conversation, once one has taken it over from the AI.
ChatMessage
A single message in a conversation.
ChatService
Talks to the MySampark backend over REST and WebSocket on behalf of MySamparkChatScreen / MySamparkChatBubble. Most apps only use it for resetVisitor (call it on logout); it is also exported for advanced integrations that want to drive the chat without the built-in UI.
MessageCta
MessageHighlight
MessagePayload
MessageSection
MySamparkChat
Global controller for the MySampark Chat SDK.
MySamparkChatBubble
A floating action button that opens MySamparkChatScreen in a bottom sheet and shows an unread badge plus in-app notification banners for messages that arrive while the visitor isn't looking at the chat.
MySamparkChatObserver
A NavigatorObserver that automatically tracks screen views and sends them to the MySampark admin dashboard (just like web URL tracking).
MySamparkChatScreen
The full chat UI: a Home tab (greeting, Offers/Chat/Track Order cards) and a Chat tab (message thread, pre-chat survey, lead form).
OfferItem
An active offer/discount code, as returned by ChatService.fetchOffers.
OrderTrackingField
One merchant-defined field on the Track Order form, beyond order number and email.
OrderTrackResult
Result of an order lookup via ChatService.trackOrder.
ProductCard
One product card shown under an assistant reply.
WidgetColors
The widget's brand colors, parsed from the hex strings the admin dashboard sends in WidgetConfig.
WidgetConfig
The widget's configuration, as set in the MySampark admin dashboard — returned by ChatService.init.

Enums

MessageRole
Who sent a ChatMessage.