engagive_flutter library

Legacy export path — prefer package:engagive_flutter_sdk/engagive_flutter_sdk.dart.

Classes

Engagive
Main Engagive SDK entry point.
EngagiveAiStreamChunkEvent
EngagiveAiStreamDoneEvent
EngagiveAiStreamErrorEvent
EngagiveAiStreamStartEvent
EngagiveAiTypingEvent
EngagiveApiResponse<T>
Standard Engagive API success envelope helper.
EngagiveBehavior
Behavior constants aligned with public/widget/appchat.js.
EngagiveChatBubble
Legacy floating launcher — prefer Engagive.openChat on your own button.
EngagiveChatController
Chat state for EngagiveChatScreen: history, send, realtime, mark-read.
EngagiveChatDateSeparatorItem
EngagiveChatListBuilder
Builds ordered chat rows with date separators (widget appendDateSeparatorIfNeeded).
EngagiveChatListItem
Single row in the chat ListView (message, date separator, or stream).
EngagiveChatMessageItem
EngagiveChatScreen
Full-screen visitor chat UI.
EngagiveChatStreamItem
EngagiveClientContext
Sent as client_context on POST /session (Phase 1 backend).
EngagiveConfig
SDK initialization options.
EngagiveContact
Contact snapshot returned from POST /session.
EngagiveDateUtils
Date separator labels (widget formatWidgetDateLabel).
EngagiveDefaultChatIcon
Default portal launcher icon — same rounded chat stroke as web widget /icons/chat-icon.svg. @deprecated Portal widget icon is website-only.
EngagiveGuestId
Host-owned anonymous visitor ids for pre-login SDK sessions.
EngagiveIdentityResolution
Resolved identity fields sent to Engagive visitor API.
EngagiveIdentityResolver
Validates EngagiveUser and maps to API session identity fields.
EngagiveInteractiveActionButton
Action button derived from sent interactive payload.
EngagiveInteractiveListRow
Parsed interactive list row (widget ixListSectionsDetailed).
EngagiveInteractiveListSection
Parsed interactive list section.
EngagiveInteractivePresentation
Presentation model for sent interactive messages.
EngagiveInteractiveUtils
Helpers for content_json.interactive (widget ix* functions).
EngagiveLocationData
Parsed location payload from message content_json.
EngagiveLocationService
Current device location (widget navigator.geolocation.getCurrentPosition).
EngagiveMediaDraft
Pending media attachment before upload (widget mediaDraftFile / mediaDraftKind).
EngagiveMediaLauncher
Opens media URLs externally (document tap-to-download fallback parity).
EngagiveMediaPicker
Picks and validates media files (widget triggerMediaPick + size check).
EngagiveMediaPolicy
Media MIME allowlist and size limits aligned with backend src/utils/appchatMediaStorage.js → BUSINESS_CHAT_MEDIA_MIMES.
EngagiveMediaUrl
Resolves stored media paths to absolute URLs (widget resolveMediaSrc).
EngagiveMediaValidationResult
Client-side media validation before upload.
EngagiveMessage
EngagiveMessageBubble
Single message bubble with Engagive theme colors.
EngagiveMessageHost
Provides thread context for interactive/template message renderers.
EngagiveMessageInput
Message composer with attach menu, media preview, and optional caption.
EngagiveMessageRenderContext
Rendering context passed to each message-type renderer.
EngagiveMessageRendererRegistry
Registry of message-type renderers (extensible in host apps).
EngagiveMessageReplyUtils
Reply preview labels (widget messageReplyPreviewWidget).
EngagiveMessageSendPayload
Builds POST /messages bodies matching web widget sendImgBtn flow.
EngagiveNewMessageEvent
EngagiveNoOpPushIntegration
No-op push integration for tests.
EngagivePagination
Pagination metadata from GET /messages.
EngagivePushDiagnostics
Read-only push registration state for host QA / dev panels.
EngagivePushIntegration
Optional FCM / push hook for host apps.
EngagivePushPayload
Parsed FCM data payload for visitor chat push (contract v1).
EngagiveReactionUpdateEvent
EngagiveReactionUtils
Reaction helpers (widget parseReactionJson / QUICK_EMOJIS).
EngagiveRealtimeClient
WebSocket client for /ws?accountId=&token= visitor realtime (Phase 2 backend).
EngagiveRealtimeEvent
Parsed realtime event from /ws (Phase 5 will wire the client).
EngagiveRecoveryMode
Portal contact recovery mode from widget require_email / require_phone.
EngagiveRecoveryRequirements
Portal pre-chat / history recovery requirements for the host app.
EngagiveRecoveryValidationResult
Result of client-side portal profile validation (anonymous SDK sessions).
EngagiveSession
Active visitor session after POST /api/widget/appchat/session.
EngagiveStatusUpdateEvent
EngagiveStreamBubble
In-memory AI stream bubble shown before the persisted message arrives.
EngagiveTemplateButton
Template button from content_json.buttons.
EngagiveTemplatePresentation
Parsed template message payload (buildSentTemplateShell).
EngagiveTheme
Theme from visitor settings (chat screen fields for mobile SDK).
EngagiveTypingIndicator
AI typing indicator — incoming bubble with border (widget egv-appchat-typing-bubble).
EngagiveUnknownEvent
EngagiveUser
Visitor identity passed to Engagive.identifyUser.
EngagiveWidgetIcon
@deprecated Portal widget icon is website-only. Mobile SDK does not use widget icons.
EngagiveWidgetSettings
Widget settings from GET /api/widget/appchat/settings.
EngagiveWsEventType
WebSocket event type names (must match backend broadcasts).
MessagingCapabilities
Plan messaging capabilities from settings/session (matches web widget caps).

Enums

EngagiveCaptureSource
Where a photo or video is captured from.
EngagiveErrorCode
Structured error codes returned by Engagive widget API (Phase 1+).
EngagiveIdentityKind
Resolved SDK identity mode for POST /session (matches backend contract).
EngagiveMessageType
Supported message types in MVP vs deferred (parity with appchat.js).
EngagiveRealtimeConnectionState
WebSocket connection lifecycle for EngagiveRealtimeClient.

Functions

engagiveChatBubbleFabLocation([EngagiveTheme? theme]) → FloatingActionButtonLocation
@deprecated Portal launcher position is website-only. Host app chooses FAB placement.
engagiveDefaultChatIconUrl(String apiBaseUrl) → String
@deprecated Portal widget icon is website-only.
engagiveTestWebSocketConnector(WebSocketChannel factory(Uri uri)) → EngagiveWebSocketConnector
@visibleForTesting
isPushEligibleIdentity(EngagiveIdentityResolution identity) → bool
isPushEligibleIdentityKind(String? identityKind) → bool
Whether visitor push register/send applies (identified SDK users only).
resolveEngagiveWidgetIconUrl({required String apiBaseUrl, required String widgetIconUrl}) → String?
@deprecated Portal widget icon is website-only. Mobile SDK does not use widget icons.
sendEngagiveRealtimePing(WebSocketChannel channel) → void
Sends an application-level ping (backend responds with {type: pong}).

Typedefs

EngagiveInteractiveReplyHandler = Future<void> Function({required String contentSummary, required Map<String, dynamic> interactive, required int parentMessageId})
EngagiveMessageReactionHandler = Future<void> Function(int messageId, String emoji)
EngagiveMessageRendererFn = Widget Function(BuildContext context, EngagiveMessageRenderContext renderContext)
Builds the inner content of a message bubble for one message_type.
EngagiveRetryFailedHandler = Future<void> Function(EngagiveMessage message)
EngagiveScrollToMessageHandler = void Function(int messageId)
EngagiveSetReplyHandler = void Function(EngagiveMessage message)
EngagiveTemplateQuickReplyHandler = Future<void> Function({required int parentMessageId, required String text})
EngagiveWebSocketConnector = Future<WebSocketChannel> Function(Uri uri)