v_chat_flutter 0.1.0-rc.3 copy "v_chat_flutter: ^0.1.0-rc.3" to clipboard
v_chat_flutter: ^0.1.0-rc.3 copied to clipboard

Flutter and Drift composition for the V Chat end-user SDK.

v_chat_flutter #

Release candidate 0.1.0-rc.3 is the coordinated Flutter composition package. Add it with flutter pub add v_chat_flutter. It requires Flutter 3.38.0 or newer and Dart >=3.10.0-0 <4.0.0.

Android, iOS, web, macOS, Windows, and Linux are release-candidate targets only when the matching CI build gate passes. See the repository support, security, and privacy policies before production adoption.

Flutter composition package for V Chat. It creates the core client with:

  • Dio HTTP transport
  • the released secure app-user session boundary
  • Drift local persistence
  • the released typed current-user device-registration client
  • released app-user channel create/get/update
  • scoped cached channel pages and cache-then-network snapshots
  • active current-user membership projection with bounded scoped offline reconciliation
  • released top-level message and direct-reply/thread lifecycle with isolated confirmed scoped history
  • released own-user reaction add/remove, bounded message summaries, and exact-type reactor pages
  • released attachment intents, isolated signed-target transfers, and scoped metadata-only cache
  • provider-neutral token/notification sources, push preferences, and durable route deduplication
  • released realtime ticket, ready, close mapping, bounded reconnect, and opt-in app lifecycle binding
  • acknowledged authorized channel subscriptions with connection-local typed handles
  • SDK-FL-010 typed durable realtime event application and bounded listener/diagnostic surfaces
  • SDK-FL-015 exact-user presence and channel/thread typing with reconnect rewatch
  • SDK-FL-016 policy-owned Flutter lifecycle and platform-connectivity integration

The SDK uses the exact returned one-use ticket URL and vchat.realtime.v1; it sends no JSON auth or heartbeat frame. Call sdk.lifecycleBinding.attach() to enable SDK-FL-016 background/connectivity suspension and foreground/transport resume. The binding resumes only a suspension it owns, treats inactive as transient, re-evaluates on hot reload, and can be awaited through disposeAsync(). The default connectivity adapter reports platform transport hints only and does not prove Internet reachability; ticket, socket, timeout, and reconnect behavior remain authoritative.

VChatPushIntegrationBinding subscribes to host token and notification sources before reading their initial snapshots, serializes token rotation, fences stale callbacks after detach, and can revoke the exact installation before logout. It adds no APNs, FCM, or Web Push dependency: permission, provider initialization, background callback registration, foreground presentation, and native credentials remain host-owned.

The composed client exposes createChannel, getChannel, updateChannel, getCachedChannel, queryCachedChannels, watchChannel, queryCurrentUserMemberships, refreshCurrentUserMemberships, and queryCachedCurrentUserMemberships. It never accepts an app-server credential, so privileged channel queries and membership administration remain outside the Flutter bundle.

The same client exposes sendMessage, queryMessages, getMessage, updateMessage, deleteMessage, getCachedMessage, queryCachedMessages, sendMessageReply, getMessageThread, getCachedMessageThread, markMessageThreadRead, addMessageReaction, removeMessageReaction, and listMessageReactionUsers. Confirmed replies are stored separately from top-level history. Reaction summaries use their own monotonic cache version; reactor pages and offline reaction commands are not persisted.

The same client exposes attachments plus the flat attachment operations. Upload and download streams are caller-owned and consumed once; signed targets are never stored, logged, or combined with API bearer headers. Drift stores only validated owner-scoped metadata and tombstones.

After connectUser, the same client exposes connectRealtime, disconnectRealtime, suspendRealtimeIfConnected, resumeRealtimeIfSuspended, realtime state streams, safe failures, and validated ready metadata. Socket and retry state are never written to Drift.

Applications may inject a VChatConnectivityMonitor into VChatFlutterSdk.create for tests or a different host policy. VChatConnectivityState is deliberately closed to available, unavailable, and unknown; failures become unknown without logging network identifiers.

On a ready connection, subscribeChannel returns only after the released acknowledgement and unsubscribeChannel waits for the matching removal acknowledgement. Handles report active, restoring, stale, revoked, or closed; restoration rechecks authorization after reconnect without claiming event continuity. Typed accepted events update scoped Drift state before global, exact-channel, or current-user callbacks. Subscription and listener registrations remain memory-only.

Each active channel handle also exposes presence and typing. Presence replacement becomes visible only after its acknowledgement and becomes unknown as soon as the socket disconnects. Typing watches are exact to the main channel or one thread; keystroke refreshes a bounded lease and a two-second idle timer sends stop. Watches are restored after recovery, but the connected user's typing emission is never replayed.

0
likes
0
points
267
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter and Drift composition for the V Chat end-user SDK.

Homepage
Repository (GitHub)
View/report issues

Topics

#chat #flutter #realtime #offline-first #sdk

License

unknown (license)

Dependencies

connectivity_plus, drift, drift_flutter, flutter, v_chat_core, v_chat_persistence_drift

More

Packages that depend on v_chat_flutter