Closed comatory closed 2 years ago
I just uploaded version 3.0.0 which can accept streams from application as the source. Hope that solve this problem.
I just uploaded version 3.0.0 which can accept streams from application as the source. Hope that solve this problem.
Yes I think it's better to expose the stream like you did.
In my application I'm using
Geolocator
to track multiple position streams and I also useLocationSettings
object that I'm sharing between different calls toGeolocator.getPositionStream
.I want to be able to sync all streams with same settings, especially
distanceFilter
option. I tried changing this during runtime, for example creatingLocationSettings
withdistanceFilter=0
(default) and then switching todistanceFilter=20
so my location is not updated as frequently.However this has no effect. Looking at the code it seems like the stream is only initialized when the plugin is created. I think it would make sense to detect that
locationSettings
object has changed indidUpdateWidget
method and re-set the stream.Example code: