Need to know whether I can get last value from Stream without using third party library.
The first way I tried, when I can sending the value to stream in 'changeEmail', I can store the newValue in some variable in my BLoC. Is it correct?
The second way I tried, is adding a listener, that will also do the same job as above and I need to store the newValue in some variable.
I have SteamController:
final _emailController = StreamController<String>.broadcast();
Have gitters:
Stream<String> get email => _emailController.stream; // getting data from stream
get changeEmail => _emailController.sink.add; // sending data to stream
rxdart
. There are many use cases where it's cumbersome without all the transformers it provides. – UnspentStream
so that it provides this feature in a reusable way (like rxdart does ;-) ). – Unspent