Skip to main content
Documentation
StartOverviewArchitectureAuthenticationSend your first message
TypeScript SDKOverviewTrusted app serverApp-user clientsRealtimeErrors & webhooks
Flutter SDKOverviewInstallationAuthenticationChannels & messagesOffline & syncRealtimeUI componentsPush & lifecycle
ConceptsTenancy & scopeChannels & messagesDelivery & reconciliationSecurity checklist
ProtocolsRealtimeSigned webhooks
ReferenceREST APIErrors, limits & retriesDeploy docs to Coolify
VV ChatDocs API v1
Recommended starting points
Build chat without rebuilding infrastructureV Chat is a multi-tenant messaging backend with typed server, web, and Flutter integration paths.StartArchitecture at a glanceUnderstand the control plane, data plane, realtime path, and SDK boundaries before integrating.StartAuthentication and credentialsSelect the correct credential for dashboard, trusted-server, app-user, realtime, and webhook flows.StartSend your first messageUse the trusted TypeScript server client to create the minimum safe messaging flow.StartTypeScript SDK overviewChoose the correct typed client for trusted servers, app users, dashboard sessions, realtime, and webhooks.TypeScript SDKTrusted app-server clientUse AppServerClient from a protected backend to manage data-plane resources and mint app-user tokens.TypeScript SDKApp-user clientsBuild browser or Node app-user flows with VChatClient or the lower-level AppUserClient.TypeScript SDK
↑↓ Navigate↵ Openesc Close
API reference
StartOverviewArchitectureAuthenticationSend your first message
TypeScript SDKOverviewTrusted app serverApp-user clientsRealtimeErrors & webhooks
Flutter SDKOverviewInstallationAuthenticationChannels & messagesOffline & syncRealtimeUI componentsPush & lifecycle
ConceptsTenancy & scopeChannels & messagesDelivery & reconciliationSecurity checklist
ProtocolsRealtimeSigned webhooks
ReferenceREST APIErrors, limits & retriesDeploy docs to Coolify
Contract sourceOpenAPI JSON
Docs/Flutter SDK
Realtime and recovery

Flutter realtime

Connect the v1 WebSocket lifecycle, subscribe to channels, process durable events, and handle app lifecycle.

Updated 2026-08-09•sdks/flutter/packages/v_chat_core/README.md · docs/realtime/v1

Connection lifecycle

dart
final info = await client.connectRealtime();
renderConnectionId(info.connectionId);

await client.suspendRealtimeIfConnected();
await client.resumeRealtimeIfSuspended();
await client.disconnectRealtime();

connectRealtime requires a connected user, obtains a fresh one-use ticket, offers only vchat.realtime.v1, and returns after connection.ready. Automatic reconnect uses fresh authentication and bounded jittered backoff.

Subscribe to a channel

dart
final subscription = await client.subscribeChannel(identity);

final cancelEvents = subscription.onEvent((event) {
  renderDurableEvent(event);
});

final cancelPrivate = client.onUserMessagingState((state) {
  reconcilePrivateState(state);
});

cancelEvents();
cancelPrivate();
await subscription.unsubscribe();

The SDK commits valid typed event state into the exact scoped cache before host callbacks run. Subscriptions remain connection-local and reconnect restoration rechecks authorization.

Pressure and terminal closes

Frames, queues, subscriptions, and in-flight commands are bounded. Protocol/policy, connection-limit, and slow-consumer closes are terminal for the automatic cycle. Correct the consumer, refresh authoritative state, then reconnect explicitly.

Presence and typing

Presence watches replace 1–50 exact users and decay to unknown when freshness expires. Typing supports the channel and one-depth thread contexts, rate-limits keystrokes, and sends an idle stop. Disconnect clears both; recovery restores watches after durable repair but never replays typing.

PreviousOffline state and reconciliationNext Flutter UI components
On this pageConnection lifecycleSubscribe to a channelPressure and terminal closesPresence and typing
Report a docs issue