Repository navigation
docs(flutter): Chat SDK 5.1.2 and UI Kit 6.4.0 offline support - #635
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add an Offline Support page for the Flutter UI Kit: requirements, how to enable it with UIKitSettingsBuilder.offlineConfig, how each component behaves offline, the offline texts and the 22 new Translations strings, errors and callbacks, customization, and what changes with offline off. Add short offline notes to the component, events, localize, methods, core features, getting started and overview pages, update the pin and save guide for the onSuccess update, and bump the UI Kit pins to ^6.4.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
ketanyekale
left a comment
There was a problem hiding this comment.
Review of the Flutter 5.1.2 / 6.4.0 docs: 2 things to fix before merge (the second-fetchNext() empty-list rule, and the UI Kit 6.3.0 to SDK 5.1.2 upgrade risk), plus a few nits. Anchors and cross-page links I checked all resolve.
- State the overlapping fetchNext() empty page as the one server-phase exception, name its callback, and warn it is not the end of the list. - Warn that flutter pub upgrade moves UI Kit 6.3.0 apps to SDK 5.1.2, and how to avoid the pin/save regression. - Mark the acting-device listener change as since v5.1.2. - Clarify failedIconColor and the UI Kit's Dart/Flutter patch floor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Conversations: own pins update from onSuccess since SDK 5.1.2; added to the offline page's pin and save section. - Offline support: messages sent with CometChat.send*Message directly get no unsent row in the message list. - Localize: lead with CometChatLocalize; Translations is deprecated. - Troubleshooting: add an Offline Support section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dart run cometchat_sdk:setup_web downloads the sqlite3.wasm and drift_worker.js the offline database needs on Flutter web. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ketanyekale
left a comment
There was a problem hiding this comment.
Re-reviewed up to d92c8c3. All five points from my earlier review are fixed: the overlapping-fetchNext() exception in offline-cached-data, the reference and both Offline Behaviour sections; the UI Kit 6.3.0 pub upgrade Warnings; "since v5.1.2" on the listener rows and notes; the failedIconColor description; and the Dart/Flutter minimums. The follow-ups (conversation pins from onSuccess, direct CometChat.send*Message getting no unsent row, the setup_web step, the troubleshooting section) look right, and anchors and link-rot pass. Approving.
Two optional nits, not blocking:
ui-kit/flutter/localize.mdx: the "Customizing UI Kit Translations" snippet now callsrunApp(const MyApp()), but its only import is the UI Kit. It needsimport 'package:flutter/material.dart';to compile as pasted.sdk/flutter/save-message.mdx: the new<Warning>sits inside the existing<Note>, so it renders as a callout inside a callout. Moving it after</Note>would match pin-message and pin-conversation.
I haven't checked the new CometChatLocalize API (supportedLocales, localizationsDelegates, registerTranslations) against the 6.4.0 package source; I'm relying on your check there.
jitvarpatil
left a comment
There was a problem hiding this comment.
Reviewed against the packages published on pub.dev (cometchat_chat_uikit 6.4.0 and cometchat_sdk 5.1.2). Approving: nothing blocks the merge.
Checked and fine
- Every navigation entry resolves; the new page sits after Core Features. No pages removed or renamed, so no redirects are needed. No broken links or
#sectionanchors in the changed pages. - The localization API matches the 6.4.0 package (the part not checked before):
CometChatLocalizehasdelegate,localizationsDelegates,supportedLocales,of(context)andregisterTranslations(...);CometChatLocalizationsistypedef CometChatLocalizations = Translations;Translationsis@Deprecated; the changelog listsCometChatLocalizeunder v6.3.0. - All 22 new getters and their English texts in both tables (
localize.mdx,offline-support.mdx) match the package, including the plural forms, and every built-in language has them. - Other API names exist:
UIKitSettingsBuilder.offlineConfig,initFromSettings(offlineConfig:),hideOfflineNotices(Conversations, Message List),notSentTextStyle/failedIconColor,ccMessageSendStateChanged,ccOfflineCacheReset,CometChatMessageSendState,sendStateOf(BaseMessage),hideError(Conversations, Groups, Group Members); in the SDKOfflineCacheResetReason.schemaReset,ReactionsRequest.fetchPrevious({..., ReactionFetchListener? listener}),CometChat.isOfflineEnabled()(a plainbool, as in the example) and thesetup_webscript. - Versions match the pubspecs: UI Kit 6.4.0 needs
cometchat_sdk: ^5.1.2, Dart 3.10.8+, Flutter 3.38.9+; the SDK alone needs Dart 3.10.0 / Flutter 3.38.0. - The pin/save callback change and the 6.3.0
pub upgradewarning read the same on every page.
Nits (Ketan's two optional points, still open at d92c8c3)
ui-kit/flutter/localize.mdx, "Customizing UI Kit Translations": the snippet callsrunApp(const MyApp())but only imports the UI Kit; addimport 'package:flutter/material.dart';.sdk/flutter/save-message.mdx: the new<Warning>is inside the existing<Note>; move it after</Note>to match pin-message and pin-conversation.
- localize: add the Flutter material import the custom-translations snippet needs for runApp. - save-message: close the Note before the UI Kit 6.3.0 Warning, matching pin-message and pin-conversation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
92d717f
raj-dubey1
left a comment
There was a problem hiding this comment.
Approved at Aditya Gokula's request on Slack. This approval was given on request; no code review was done for it.
jitvarpatil
left a comment
There was a problem hiding this comment.
Re-reviewed up to 92d717f. Both nits are fixed and nothing else changed:
ui-kit/flutter/localize.mdx: the "Customizing UI Kit Translations" example now importspackage:flutter/material.dart, sorunApp(...)compiles as pasted.sdk/flutter/save-message.mdx:</Note>now closes before the<Warning>, so they render as two separate callouts, as on pin-message and pin-conversation.
My earlier checks against the published cometchat_chat_uikit 6.4.0 and cometchat_sdk 5.1.2 packages still apply. Approving.
ketanyekale
left a comment
There was a problem hiding this comment.
Re-reviewed up to 92d717f. Both optional nits are fixed and nothing else changed: the localize override example imports package:flutter/material.dart, and in save-message the </Note> now closes before the Warning. Link-rot passes. Approving again, since the push dismissed my earlier approval.
Combines #628 (Flutter Chat SDK 5.1.2) and #630 (Flutter UI Kit 6.4.0 offline support) into one PR. Both releases are live on pub.dev:
cometchat_sdk5.1.2 andcometchat_chat_uikit6.4.0 (which requires^5.1.2), so this can merge now. The two PRs touch different files; this branch is their four commits on top ofmain, with no other changes.Flutter Chat SDK 5.1.2 (from #628)
onSuccess. Flutter UI Kit 6.3.0-or-earlier users upgrade to 6.4.0 with SDK 5.1.2.OfflineCacheResetReason.schemaReset(cache written by a newer SDK version, e.g. after an app rollback, rebuilt; not encryption-related), and aswitchwithoutdefaultmust handle it.ReactionsRequest.fetchPrevious()takes an optionalReactionFetchListener(cached first, then server).byteOverflowonly if the file (or, for a message with several files, the files together) still cannot fit. Media of queued messages does not count toward the budget.fetchNext()onConversationsRequest/BlockedUsersRequeststarted while one is loading completes at once with an empty list.^5.1.2(recommended; Flutter UI Kit 6.4.0 requires it). The 5.1.0 minimum is unchanged.Flutter UI Kit 6.4.0 (from #630)
ui-kit/flutter/offline-support.mdx: requirements, enabling withUIKitSettingsBuilder.offlineConfig, how each component behaves offline, the offline texts and the 22 newTranslationsstrings (breaking for apps thatimplements Translations), errors and callbacks, customization, what changes with offline off, and limitations. Added to the nav after Core Features.onSuccess.^6.3.0to^6.4.0.#628 was approved by Ketan and Review Buddy; its review points (the media budget wording,
byteOverflowfor several files, the pin-conversation sentence order) are in.mint broken-linksreported only the existingCONTRIBUTING.mdlink on #630.🤖 Generated with Claude Code