0

How can I have multi users that share the same screen and values? In this case, the users would interact with 5 cards. When one user taps one card, it is removed for other users. The data comes from a php rest api. As I am not using Firestore, is it possible to have the same as Firestore transaction? The documentation for Firestore Transaction: https://firebase.flutter.dev/docs/firestore/usage/

Question also related to Flutter/ Dart Users sharing same screen at the same time

cabral279
  • 97
  • 10
  • 1
    If your php API supports streaming, you can use streambuilders for users. They will both be watching the same data. When a user taps on a card, send POST to your API to remove the card, both users should have the card disappear at the same time, given they have decent internet upload\download. – Huthaifa Muayyad Apr 12 '21 at 07:59
  • 1
    Other option could be API polling, Keep Calling the API in some regular interval and if there is any update in the response change the state of the page for user. in case you want to avoid multiple API calls you can use firebase notification or websocket connection to get the callback(trigger) on data update on backend side. – Saurabh K. Sharma Apr 12 '21 at 08:27

0 Answers0