Replies: 2 comments 3 replies
-
|
My understanding is that "work with remote backends" is something beyond the responsibilities of the flutter_chat_ui and needs to be implemented by the respective apps |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Sorry about the lack of a BE example - I was working on a guide for Firebase but never finished it 😭
Hope that helps. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Guys,
First of all, great package. Very customisable and very well performant.
I’m trying to better understand the intended purpose of ChatController in flutter_chat_ui.
From the docs and examples, it looks like the controller is designed primarily for local persistence / local state management (e.g. InMemoryChatController, Hive example). However, I’m struggling to understand how this is meant to work with remote backends.
Specifically:
The pagination examples (e.g. pagination_older.dart) use insertAll() to hydrate older messages when onEndReached is triggered. This implies insertAll() is used for UI hydration, not for syncing data to a backend.
If a custom controller were to persist remotely inside insertAll(), this would re-write messages that were just fetched from the backend, which seems incorrect.
So my questions are:
I’d appreciate clarification on the intended architecture here — especially for apps using remote backends (Firebase, Supabase, etc). Perhaps an example? I can't find any backend examples.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions