Skip to content

docs(flutter): offline support for Flutter SDK 5.1.0 - #593

Open
adityagokula2210 wants to merge 2 commits into
mainfrom
docs/offline-support-flutter-sdk
Open

adityagokula2210 wants to merge 2 commits into
mainfrom
docs/offline-support-flutter-sdk

Conversation

@adityagokula2210

Copy link
Copy Markdown

Summary

Public docs for offline support in the Flutter Chat SDK 5.1.0. They mirror the Android SDK 5.1.0 offline docs (#584): the same page set and structure, and the same wording where the behaviour is the same. Every API name, signature, default, enum value and error code was checked against the Flutter SDK release branch.

  • 8 new pages in the Offline Support group: sdk/flutter/offline-{overview,enable,cached-data,send,sync,media-caching,encryption,reference}.mdx
  • 2 shared callouts: snippets/sdk/flutter-offline-{listener,send}.mdx
  • 31 existing v5 pages get offline notes, "Offline Behaviour" tables and listener: samples.
  • Setup: cometchat_sdk: ^5.1.0, Dart 3.10+, Flutter 3.38+, iOS 13+, Android API 21+
  • Nav: an "Offline Support" group in the Flutter v5 block of docs.json, plus the list in llms-flutter-v5.mdx

Where Flutter differs from Android

  • Fetching: reads take a listener: parameter instead of a listener overload. onSuccess/onError keep working and receive only the server result. The pages recommend listener: and don't call the callbacks deprecated, because the SDK doesn't mark them deprecated.
  • Listeners with no Android counterpart: blocked users have their own BlockedUsersFetchListener. A manual sync reports through ForceSyncListener.
  • Message details: the two-phase listener is on CometChatHelper.getMessageDetails.
  • Reactions: only fetchNext has a listener.
  • Sending: a send without listener: is never queued. To tell queued from failed, check for code ERR_CONNECTION (queued) and listen to OfflineMessageListener.onOutboxMessageFailed (failed).
  • Last sync time: getLastSyncTimestamp() returns device-clock milliseconds, or null if the cache has never synced.
  • Media: downloadMedia and getCachedMediaPath take a BaseMessage. Errors arrive as a typed MediaException.
  • Encryption: the app adds a sqlite3mc hook to its own pubspec.yaml. Web also needs sqlite3mc.wasm. The status object uses typed enums, and keys are stored per platform.
  • Cache reset: there are 5 reasons, and an unknown lost-message count is null.

Review

Five independent read-only reviewers checked the page groups against the Flutter SDK release branch. Their four confirmed findings are fixed in the second commit.

🤖 Generated with Claude Code

adityagokula2210 and others added 2 commits November 1, 2026 20:26
Add the 8 offline pages (overview, enable, cached data, send, sync, media
caching, encryption, reference), two shared callouts, offline notes and
two-phase listener samples on 31 existing v5 pages, the Offline Support nav
group, and the llms list. Mirrors the Android SDK 5.1.0 offline docs; every
API checked against the Flutter SDK release branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Send pages: tell queued from failed by ERR_CONNECTION and
  OfflineMessageListener.onOutboxMessageFailed; the passed-in message's
  status is not updated (send-offline page, send snippet, uploads, AI moderation).
- Blocked users: a cached search filters by keyword on the device.
- Media: expired URLs are re-signed on HTTP 403 or 410, not 401.
- Threads: drop the uid+guid comparison with non-thread reads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mintlify

mintlify Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
cometchat 🟢 Ready View Preview Nov 1, 2026, 3:06 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

This branch was successfully deployed

1 active deployment
staging — b6b9c586 Deployed Nov 1, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant