flutterlocation icon indicating copy to clipboard operation
flutterlocation copied to clipboard

Continouesly streaming Locationdata

Open abdullaalimobileshop opened this issue 2 years ago • 2 comments

Continouesly streaming Locationdata even if we not changing device position

abdullaalimobileshop avatar Aug 13 '23 16:08 abdullaalimobileshop

You should solve this yourself by timer etc. It's not supported by Platforms and needs lot of overhead like headless task.

xunreal75 avatar Aug 13 '23 17:08 xunreal75

Out of interest, what does continuously streaming when something hasn't changed mean? Do you emit the same value every 1 second, every 5 seconds or every 3 minutes? I think streaming deltas is much better as you don't have to overwhelm a potential client with data (if you continuously emit the same value on a stream, any widgets using this will constantly be rebuilding and is not good for performance).

Personally, I wouldn't do this via timer, but rather rewrite my code to just use the last value emitted by the stream, whether it was a second ago or 10 minutes ago.

mulderpf avatar Aug 22 '23 07:08 mulderpf