Flutter debounce api call in rxdart vanilla bloc

I have a vanilla bloc where I am implementing infinite listview. So far I have done this. Here's my bloc implementation where I am loading data into infinite listview...

Fetch all the values ever passed to sink.add in Flutter stream

Let's say that we want to create a stream which would contain a Map<String, String>. Now the catch here is that I want to create a function that would add new ke...

Bad state: You cannot close the subject while items are being added from addStream in flutter

I am using RxDart to observe changes and update the UI accordingly. When the app launches I am making a network call and successfully getting the data, observe the cha...

Flutter Streams, how to access previously emitted data from the stream

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 ch...

Sort list of objects in a stream and return the sorted list as a stream in flutter

I have list of users. I need to sort this user data based on gender. gender = { 0: 'male', 1: 'female', 2: 'others'}. I want the date to be ordered in such a wa...

Stream.last callback never firing

I'm writing my Flutter app with a BLoC pattern. And what I want is pretty simple: show a TextField with the last value from a stream as an initial value. There...

How expensive are streams?

In Flutter i have a view with a slider containing a grid of many textfields. I plan to attach each textfield to its own stream (with a streambuilder) resulting in seve...

GetX + Flutter: how to make Obx rebuild when updating a list inside an entity (and in general, what triggers an Obx rebuild)?

I'm working on a Flutter project which uses GetX for state management. We have some entities which contains List properties. A simplified version would be simil...

StreamBuilder snapshot.hasError show many times when keyboard show/hide flutter

I have a login screen and I'm using BloC pattern, but when i click on button the validation fails, the message from error is called many times, because the stream buil...

How to filter a list of obseravble in rxdart

I am trying to implement bloc pattern in rxdart . I am trying to build todo app type of app . I implemented showing all items in list but what I want is not to show co...

filter stream of ListObject by its properties that are also a List

I have a <code>List&lt;Content&gt;</code> and would like to filter by the properties of a field that is a List. Content <pre><code>class Content { // ......

Flutter - Will BLoC stream instances cause memory leak when a widget is closed?

There are some scenarios where screens with their respective BLoCs are frequently created and closed. So I'm somewhat concerned about memory safety of the Streams inst...

Merge Firestore streams using rxDart

I am trying to merge two streams from Firestore into one stream using RxDart, but it's only returning results of one stream <pre><code>Stream getData() { Stre...

How to parse an object from Streambuilder snapshot

My application is using (BLOC) RxDart and Streams to pass information around and dynamically build Widgets. However, if it pass a simple PODO ( Plain old dart...

How to show different Widget when user is offline while using StreamBuilder?

I am trying to fetch some data from the internet. With the use of <code>FutureBuilder</code>, handling for various cases like offline, online,error is quite easy but I...