I have three streams like this:
final _light1RoomCtlr = BehaviorSubject();
final _light2RoomCtlr = BehaviorSubject();
final _light3RoomCtlr = BehaviorSubject();
Stream get getLight1Room =>…
I was using Streams and rxdart for form validation. When I was using StreamController.broadcast(), button enable-disable logic was working fine.
Changing that to BehaviorSubject() button stays disabled even though the logic is…
I have a TextField within StreamBuilder that listens to BehaviorSubject stream. When snapshot has error, the errorText displays it.
The problem is when TextField is scrolled out of visible area and scrolled back in the StreamBuilder rebuilds but…
I am building a Flutter app and have run into the following issue. Following the BLoC pattern, my code is structured like this:
BLoC:
class Bloc {
final _subject = BehaviourSubject;
Observable get stream => _subject.stream;
void…
I followed this as shown (only first 3 minutes are relevant for my question): https://m.youtube.com/watch?v=MYHVyl-juUk
When I try to run it this appears in the console:
Because geoflutterfire 2.0.3+2 depends on rxdart ^0.20.0 and no versions of…
I have two streams coming from firestore and I need to do a computationally intensive operation only the first time these two streams produce values.
I've considered combineLatest2(), but as far as I can tell this will execute every time the streams…
I am implementing an api that requires recursive calls to get all data. I have implemented a Bloc component that has a recursive transformer. However, it seems the transformer is keeps returning a null accumulator on the recursive…
I have a simple app which 2 tabs, I am trying to you the bloc pattern to move data around.
Flow 1:
1. App starts bloc is created with a seeded value
2. Build method is run for the page and data shows
3. User switches to another tab
4. User switches…
I am new to flutter. I have a login (and bloc) and registration (and bloc) widget on the same Scaffold:
@override
Widget build(BuildContext context) {
_init(context);
return Scaffold(
resizeToAvoidBottomPadding: false,
…
I want to get length of BehaviorSubject's stream, but I can't get it.
test('get stream length', ()async{
BehaviorSubject subject = new BehaviorSubject(seedValue: 0);
var act = await subject.stream.length;
expect(act, 1);
});…
When adding a listener to a RxDart PublishSubject I get a StreamSubscription. I can then use the StreamSubscription to pause and resume, is there any way to do that with a StreamBuilder?
I try to get List from jsonPlaceHolder using flutter rxdart stream and try to apply bloc pattern on it.
this class that response for get post response from api
import 'dart:async';
import 'dart:convert';
import 'package:http/http.dart' as…
I am getting an error "type 'Future' is not a subtype of type 'StreamTransformer, List>" in my BLOC".
This is the structure of my app:
A BLOC (namely, reports_bloc).
A Repository (namely, repository).
An API Provider (namely, api_provider).
In…
I am trying to get data back from a screen after it closes, then add it to a stream controller in my BLoC. However when I try to retrieve the value using _bloc.streamController.value it is null. The stream controller is a BehaviorSubject.
void…
I have 2 StreamBuilder inside ListView that listen to the same Stream, that is valueStream. Inside that StreamBuilder, I have SwitchListTile that add new value to valueStream.
This is my Stream:
Observable get valueStream =>…