I am new to the flutter world. I recently started with it and got a question about what to use to accomplish the following:
I have a list of items which I want to show in a list/grid. The list gets retrieved from a remote rest call so through a future.
At the same time the app is connected to a remote mqtt server and receives mqtt update messages from other clients when they modify an item
So basically need to manipulate the local items list when an mqtt update message is received and replace the updated item. This needs to be reflected to the app UI in real-time.
I've read for futures they use FutureBuilder, but at the same time it is meant to be "set and forget" with a future that doesn't change during the app life. So there is StreamBuilder, but I don't have a real stream of things and at the same time can't replace an item in the stream but just add. So how should I realize this? It's kinda like an hybrid thing that even when searching and searching the web I can't seem to find a solution/similar case to.
Thank you in advance and sorry for the stupid question :)
Tried with futurebuilder and streambuilder but encountered the aformentioned issues with both. Not really sure on how to proceed.