Questions tagged [rxdart]

Reactive extensions on top of Dart streams.

Provides Reactive extensions on top of Dart streams.

Similar to RXjs

https://pub.dartlang.org/packages/rxdart

325 questions
0
votes
1 answer

How can i make a new stream of other streams returning a list of all the values emitted (bloc pattern)?

I have three streams like this: final _light1RoomCtlr = BehaviorSubject(); final _light2RoomCtlr = BehaviorSubject(); final _light3RoomCtlr = BehaviorSubject(); Stream get getLight1Room =>…
Daniel Vilela
  • 587
  • 1
  • 4
  • 19
0
votes
1 answer

Button stays disabled after changing StreamController.broadcast() to BehaviorSubject()

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…
0
votes
1 answer

Flutter rxDart BehaviorSubject looses error message

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…
temirbek
  • 1,415
  • 1
  • 14
  • 27
0
votes
1 answer

rxdart BehaviorSubject does not emit last value on iOS

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…
Martin Fink
  • 1,746
  • 3
  • 16
  • 32
0
votes
3 answers

How can I downgrade the rxdart plugin in flutter?

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…
BenG
  • 13
  • 2
0
votes
2 answers

combineLatest2 with only the first non-null stream outputs

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…
Simpler
  • 1,317
  • 2
  • 16
  • 31
0
votes
1 answer

NULL Accumulator on ScanStreamTransformer

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…
Isaac Obella
  • 2,613
  • 2
  • 16
  • 29
0
votes
1 answer

Flutter - rxdart - Reading stream multiple times

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…
Asad Ali
  • 151
  • 1
  • 12
0
votes
1 answer

Two different bloc causing "Bad state: Stream has already been listened to."

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, …
dom
  • 321
  • 2
  • 12
0
votes
1 answer

Dart: How I can get length of Stream?

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); });…
taross
  • 1
  • 1
0
votes
1 answer

How to get StreamSubscription from StreamBuilder

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?
Chris G.
  • 23,930
  • 48
  • 177
  • 302
0
votes
2 answers

Rx Flutter Request List From JsonPalceHolder

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…
0
votes
1 answer

Error "type 'Future' is not a subtype of type 'StreamTransformer, List>'"

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…
Deshola
  • 31
  • 1
  • 8
0
votes
1 answer

Return data from a screen and add it to a stream

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…
Arizona1911
  • 2,181
  • 9
  • 29
  • 38
0
votes
0 answers

Multiple StreamBuilder inside ListView failed to listen to the same Stream

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 =>…
1 2 3
21
22