
As the title says, I've been running the code from the example to learn how to use it (and eventually I want to use a stream builder). I can't seem to get it working though. Here's my code:
TypeScript
void main() {
WidgetsFlutterBinding.ensureInitialized();
final client =
Client()
..setEndpoint('https://cloud.appwrite.io/v1')
..setProject('<omitted>');
final realtime = Realtime(client);
final subscription = realtime.subscribe([
'databases.<omitted>.collections.<omitted>.documents',
]);
subscription.stream.listen((response) {
// Callback will be executed on changes for documents A and all files.
print(response.payload.entries.length);
});
}
The only thing it outputs is:
TypeScript
flutter: subscription: wss://cloud.appwrite.io/v1/realtime?project=<omitted>&channels%5B%5D=databases.<omitted>.collections.<omitted>.documents
15
flutter: Received heartbeat response from realtime server
TL;DR
Developers are having trouble getting realtime to work on a Flutter project, despite following the example code. The code provided seems to set everything up correctly, but the expected output is not appearing.
Solution: A possible reason for this issue could be related to the network setup or the specific configuration of the Appwrite service. Double-check the network connectivity and ensure that the Appwrite service is configured correctly. If the issue persists, consider reaching out to Appwrite support for further assistance.Recommended threads
- user_unauthorized for document creation
Hello, whenever i want to create document from flutter i get `user_unauthorized` here are the steps i did 1 Register new user : ```await account.create( ...
- How to make redis Fast and scalable for ...
Currently i built my Appwrite architecture as follow. I have multiple servers in multiple regions in germany lets say server 1 and server 2. Each server has its...
- Store Polygon
Is it okay to store polygon coordinates in a String attribute? Is that a good approach? Is there any limit on the size of the String Attribute?
