204 was a fix for #205 but is creating a new stream controller every time as it's not using the map to store the controllers. In my view, we could go in one of a few ways:
remove the map stuff to make it clearer the function is creating a new controller every time
use the map to store controllers and create broadcast streams instead of single subscription streams
use a different approach altogether (eg. RxDart, StreamTransformer)
This PR is using a StreamTransformer.
In hindsight I think I should have created a new issue rather than piggy backing on #205, happy to do so if that's preferred.
Commit Notes:
changed to a stream transformer
after thinking about it a bit I reckon a stream transformer is the way to go - it avoids the need to manage controllers and subscriptions, it was actually my first instinct when we were working on this but at the time I thought it was the more complicated option (although that really wasn't the case)
204 was a fix for #205 but is creating a new stream controller every time as it's not using the map to store the controllers. In my view, we could go in one of a few ways:
This PR is using a StreamTransformer.
In hindsight I think I should have created a new issue rather than piggy backing on #205, happy to do so if that's preferred.
Commit Notes:
Fixes #205