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 instances created in this process, because it doesn't seem they are disposed somewhere…
My standard stream:
var stream = (StreamController()..add(1)).stream;
stream.listen(print); // prints 1
My broadcast stream:
var stream = (StreamController.broadcast()..add(1)).stream;
stream.listen(print); // doesn't print anything
I want to create a TextField that check if the value exist in database.
How to do async validation using BLOC pattern with TextField widget?
Should I use StreamTransformer to add error to the Stream? I tried using DebounceStreamTransformer but it's…
In RX dart there is the RX.combineLatest method to combine the results of a stream using a callback function.
Problem is that it only emits a value when every stream has emitted a value. If one has not it does not emit.
Merges the given Streams…
I am using inject.dart to inject my bloc as a singleton, is it a bad practice i.e that causes memory leak?
Since all the streams I am using are Broadcast Streams from RxDart I was wondering if a singleton would work better?
And if not a bad…
I am using rxdart package to handle stream in dart. I am stuck in handling a peculiar problem.
Please have a look at this dummy code:
final userId = BehaviorSubject();
Stream getStream(String uid) {
// a sample code that returns a…
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 completed and uncompleted items in different part . However I am not able to filter…
Hi I have a BehaviorSubject with a simple type int, I add the value 5 to it and then add another value 5. The stream listener sent me two events.
How to force check the values and not send an event if the value is equal to the last value.
Sample…
I would like to use the Spread operator (...) on key-value-data with type safety. In TypeScript I would achieve this with Interfaces, but I could not figure out a way of doing this in dart.
Failed approach 1: Use Classes
class Foo {
int aNumber;
…
New to Flutter with BLoC. Building off of a search template, looking to have data (items) load on app load instead of on state change.
The method getCrystals() returns the correct data when the search intent .isEmpty but how can it be done on app…
I think I need to merge it together somewhere, but I can't find out how and where. I want to use in StreamBuilder ? I brought you up here waiting for your help..
getCombinedMatches(uid) {
return Firestore.instance
.collection('matches')
…
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…
I have been learning Flutter/Dart and the BLoC Pattern. I used this article as my starting point:
https://www.didierboelens.com/2018/08/reactive-programming---streams---bloc/
I have the bloc class and widget working, but I can't figure out how to…
I'm developing with reactive components streams/observables with Rx_command, Rx_dart
Problem:
In my Flutter app I have inherited widget that can be called anywhere with:
FooProvider.of(context).foo.method1...
I need to make a first call to the…
Hello there dear internet, and thank you for getx,
I have a question regarding getx rx flow &/ getx initial. I am new to getx, but a veteran in rxjs, where you get a value only emitted on .next(value);
My question is: how can - by all means [4] -…