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
- Missing Invoice
Hi! I need help with billing on my account (marelu@gmail.com). I have never received a single invoice by email. My organization has been on the Pro plan since...
- Appwrite Functions cold start
Hello. I'm seeing really long cold starts on Appwrite Cloud Functions and wanted to know if this is expected. My function just authenticates the user, fetches ...
- Error can not create `tablesdb` event wi...
When i'm trying to add an event with `tablesdb` i get an error message My event value: `tablesdb.mtg-decklist-dev.tables.queue_parsing.rows.*.create` Same err...