flutter_chat_sdk 0.2.1 copy "flutter_chat_sdk: ^0.2.1" to clipboard
flutter_chat_sdk: ^0.2.1 copied to clipboard

A backend-agnostic Flutter chat SDK with offline-first support, real-time sync, and a persistent outbound queue that survives app restarts. Bring your own backend via the ChatAdapter interface.

Changelog #

0.2.1 #

Fixes #

  • Fix GitHub Actions publishing to pub.dev by using the official dart-lang/setup-dart reusable workflow for OIDC authentication.

0.2.0 #

First public open-source release after moving the SDK from internal use to a public package.

Notes #

  • Establishes the public 0.x release line for the package.
  • Recommended for early production adoption while the public API continues to mature toward 1.0.0.

0.1.2 #

Breaking Changes #

  • Removed Conversation.shareCode and Conversation.expiresAt fields — these were specific to a particular backend and do not belong in a backend-agnostic SDK
  • Removed CreateConversationParams.expiresIn parameter
  • Removed JoinConversationParams class
  • Removed getShareCode(), joinConversation(), and validateConversationCode() from ChatRepository, ChatAdapter, and Chat — join-by-code is a backend-specific feature that should be implemented in the adapter layer
  • Removed Chat.joinConversation() and Chat.getShareCode() from the public API
  • Database schema bumped to v8: share_code and expires_at columns are dropped from the conversations table (automatic migration runs on first launch)

Bug Fixes #

  • Chat.createConversation() now throws a clear StateError instead of crashing with a null pointer if the adapter returns null for a newly created conversation

Code Quality #

  • ConversationMode.fromString() now only accepts 'standard' and 'ephemeral' — removed undocumented legacy string aliases
  • Removed an internal one-time data migration that was not applicable to new installations
  • Cleaned up internal comments that referenced implementation details of a specific backend

0.1.1 #

Bug Fixes #

  • Outbound queue now skips processing when the adapter is disconnected — optimistic messages correctly stay in pending state until a connection is established
  • Incoming PinEvent now replaces the previously pinned message instead of accumulating multiple pinned messages
  • getConversations() no longer hides conversations whose participant list has not yet been loaded

Code Quality #

  • Renamed public entrypoint from lib/chat.dart to lib/flutter_chat_sdk.dart (import: package:flutter_chat_sdk/flutter_chat_sdk.dart)
  • All boolean parameters in the public API are now named ({required bool isTyping}, {required bool isLoading})
  • Removed ConversationExtensions methods that were dead code shadowing Conversation class members
  • OutboundOperation factory methods converted to named constructors

0.1.0 #

Initial open-source release.

  • Backend-agnostic ChatAdapter interface — bring your own backend
  • Offline-first OutboundQueue with persistent SQLite storage, exponential backoff retry, and crash recovery
  • SyncEngine with initial sync, incremental sync, and per-conversation sync
  • ChatDatabase interface backed by Drift (SQLite), with optional SQLCipher encryption via DatabaseEncryptionConfig
  • ChatIdentityProvider for early SDK initialization before user login
  • Reactive watchConversations() and watchMessages() streams
  • Optimistic UI for send, react, pin, star, and archive operations
  • Flutter widgets: ConversationsBuilder, MessagesBuilder, ConnectionStateBuilder
  • HttpChatAdapter and SocketChatAdapter base classes for single-transport adapters
2
likes
140
points
125
downloads

Documentation

API reference

Publisher

verified publisherkaffah.dev

Weekly Downloads

A backend-agnostic Flutter chat SDK with offline-first support, real-time sync, and a persistent outbound queue that survives app restarts. Bring your own backend via the ChatAdapter interface.

Repository (GitHub)
View/report issues
Contributing

License

MIT (license)

Dependencies

collection, drift, equatable, flutter, intl, meta, path, path_provider, sqlite3, uuid

More

Packages that depend on flutter_chat_sdk