Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

conver serviceStatus of single stream to multi stream #57

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

skapxd
Copy link

@skapxd skapxd commented May 18, 2021

Hi, I'm new contributing.
I ran into a problem when I was listening to the status of the gps "serviceStatus" in multiple pages of my app, so I decided to make the "serviceStatus" be able to broadcast to multiple listeners

I consider that it is a minor change, it should not affect the operation of "serviceStatus"

Copy link
Member

@mvanbeusekom mvanbeusekom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @skapxd, thank you for taking the effort to create a pull request. However this seems strange to me the receiveBroadcastStream already returns a broadcast stream as the name suggests (and according to the documentation).

What you are suggesting here seems completely redundant. If there is an issue here this sounds like a bug in the Flutter framework itself and should be addressed there. In the meantime if this keeps on being a problem for you, you should convert it to a broadcast stream inside your own code for now. You could do something like:

Stream<ServiceStatus> serviceStream = LocationPermissions().serviceStatus().asBroadcastStream();

If I am wrong (believe me this happens), please leave a comment and I will reconsider.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants