I have a stream builder, and i want to access the previously emitted value from the stream. If one is familiar with distinct, they must know that distinct basically checks if previous and current value is the same. I want access to the previous value. To create my own custom condition.
I am using replay-subject from RxDart with a max capacity : 2. No whenever i add something to the sink of the stream using sink.add(data); all the instances of replay-subject are replaced by the new data. thus, i do not have access to the previous data, it just gets overridden. I am stuck need help in how to add data to the replay subject. if not using sink.add() method