Flutter StreamBuilder time out when phone in sleep

Viewed 72

In my app I use several streambuilders to show data from my own REST API. Everything works fine. However when I leave my app in front and my phone enters sleep mode and 10min later I come back, 9 out of 10 times the streambuilder is giving me an hasError thrown.

I don't know why this is happening since there is no real error with the data, it looks like the streambuilder can't handle the fact that the phone is sleeping and it still wants data to collect.

Any way to let the stream deal with this? I use bloc for my streams.

0 Answers
Related