What is your code?
Just a moment
@Steven
Stream<RealtimeMessage> getLatestMessage();
Stream<RealtimeMessage> getLatestMessage() {
final realtime = _realtime.subscribe([
'databases.${AppwriteConstants.databaseId}.collections.${AppwriteConstants.messagesCollection}.documents'
]).stream;
return realtime;
}
final getLatestMessageProvider = StreamProvider((ref) { final chatApi = ref.watch(chatsApiProvider); return chatApi.getLatestMessage(); });
As the error says, you can't modify the provider in a build function
The error even gives you suggestions for what to do
Thankyou
Recommended threads
- Update User Error
```ts const { users, databases } = await createAdminClient(); const session = await getLoggedInUser(); const user = await users.get(session.$id); if (!use...
- Our Appwrite organization is suspended
Please give support regarding this , no app is working now , please solve my issue and give support , no one is replying in message section or email.
- Project in AppWrite Cloud doesn't allow ...
I have a collection where the data can't be opened. When I check the functions, there are three instances of a function still running that can't be deleted. The...