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
- Android SDK: Kotlin null Value Not Updat...
Hi team, I think you should check the Android SDK implementation once, as it seems to have an issue handling Kotlin **null** values. For example: When I send:...
- Can't connect GitHub — 500 error at the ...
Appwrite Cloud, Pro plan, SFO region. All my Git connections vanished today — Sites and all 15 Functions now show no repository connected. When I try to add a ...
- GB Hours IS NOT resetting
Hi, I was checking my usage and noticed that all of my usage quotas were reset on August 20, 2026, when my billing cycle renewed. Everything else appears to ha...