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
- I'm experiencing a critical bug on Appwr...
Hey <@870607367597850624> team / support π I'm experiencing a critical bug on Appwrite Cloud that's blocking my production Flutter app. I've already filed GitH...
- context deadline exceeded
Hi, in one of my projects i continuously receive context deadline exceeded when trying to reach users API from my local machine: https://fra.cloud.appwrite.io/v...
- π Realtime Flutter SDK Crash β Realtime...
**Summary** When using Appwrite Cloud with the Flutter SDK (latest appwrite release: 21.4.0), Realtime crashes with: ```Unhandled async error: type '_Map<String...