I have a stream that holds string values and i want to get the last value in that string. what's the best way to do it?
Stream<String> get searchTextStream {
return _searchController.stream.transform(
StreamTransformer<String, String>.fromHandlers(
handleData: (value, sink) {
if (value.isEmpty || value.length < 4) {
sink.addError('please enter some text..');
} else {
sink.add(value);
}
},
),
);
}
BehaviourSubject
. pub.dartlang.org/documentation/rxdart/latest/rx/… – Congregation