How to listDocuments() as a Stream of data from an Appwrite database with Flutter?

376

Apparently, this functionality is still in beta. It's called Appwrite Realtime. You can find all information about it here.

Share:
376
Noodles
Author by

Noodles

Updated on December 01, 2022

Comments

  • Noodles
    Noodles over 1 year

    I am using a StreamBuilder to build my widget. But database.listDocuments() only returns a Future. Is there a way to get a stream of documents which automatically triggers a widget rebuild on a database update just as with Firebase's snapshots() stream?

    • pskink
      pskink almost 3 years
      nope, it seems that Streams are not supported
    • dlohani
      dlohani almost 3 years
      Hey @FrankvanPuffelen, I'm Damodar from Appwrite team 1. The Appwrite database in stable version (0.9) doesn't yet support realtime capability so there is no way to get stream there, you can use FutureBuilder and use it along with some kind of state management solution to make it work 2. As mentioned in the answer by Noodles below, realtime support is in preview version learn more about it here notion.so/…
    • Frank van Puffelen
      Frank van Puffelen almost 3 years
      That sounds like a perfect answer @dlohani! 👍