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
4
votes
2 answers

Efficient Canvas rendering in Flutter

I have been trying to develop a drawing app and all the example codes including the one's from The Boring Flutter Development Show don't translate well into real-world usage. The main problem being that CustomPaint's paint operation is too expensive…
Dhruva
  • 210
  • 1
  • 14
4
votes
2 answers

How can I deal with the firestore whereIn limit of 10 when using a switch stream?

I have the following Stream that takes in a Stream of a group and returns a Stream of it's members. I use a switchmap to get the members from the group snapshot. But I have the following problem. I use a where query with a whereIn filter. But the…
anonymous-dev
  • 2,897
  • 9
  • 48
  • 112
4
votes
1 answer

type 'BehaviorSubject' is not a subtype of type 'Stream' of 'stream'

I have this weird error I'm getting and I can't seem to fix this. I am implementing the bloc pattern in my login page. I can't seem to point out what I am doing wrong. Here is my code login_bloc.dart import 'package:rxdart/rxdart.dart'; import…
Patrick Obafemi
  • 908
  • 2
  • 20
  • 42
4
votes
2 answers

Why adding data in Flutter Sink is not working?

Purpose is very simple. After getting data it is filterable by specific set of Strings. So I am initially filtering with 'all' which means showing all data and when clicking any choice chips then filtering based on that specific strings. Everything…
demo_Ashif
  • 139
  • 2
  • 18
4
votes
3 answers

Dartlang rxdart - merge different type streams

here is my use case: I have two different Observables: Observable adEventStream; Observable colorStream; I need to receive notification when either of those two emits an event. zipWith does not work for me, since it waits…
Angel Todorov
  • 1,443
  • 2
  • 19
  • 37
4
votes
6 answers

Generate a stream with delays for each emit in dart

I want to emit values in a stream from a list with a specific delay in dart. So, from [1,2,3], which is a regular List I want to emit values like 1...2...3 in separated events. I tried something like this List myList = [1,2,3]; Subject _current…
David
  • 3,364
  • 10
  • 41
  • 84
4
votes
1 answer

Flutter - BLoC pattern - How to use streams to invoke a method of another widget, i.e. an animation?

Suppose there is a widget with a method controlling visibility animation, toggleVisibility(). In a BLoC pattern, I want to use a stream to invoke that function. I find this pretty tricky. Since it is an animation rather than a complete redraw, a…
First_Strike
  • 1,029
  • 1
  • 10
  • 27
4
votes
1 answer

StreamBuilder and AsyncSnapshot + rxdart flutter question

I have final _fetcher = PublishSubject() ; in my bloc Component. Here is structure of MyModel: MyModel { List _objects = []; List get allObjects => _objects; } also there is Observable get myObjects =>…
3
votes
0 answers

How to efficiently render a list of fast changing data in Flutter?

I have a stream of a fast-changing data: final dataStream = Stream>.periodic( const Duration(milliseconds: 30), (count) => List.generate(30, (i) => count + i), ); And I want to perform a live update of the UI based on the new…
Karol Lisiewicz
  • 654
  • 5
  • 15
3
votes
0 answers

Watching data in Hive database with RxDart

I’m using Hive and RxDart Is there a better way of emitting values from my Hive box than Stream> watchTissues() { return tissueBox .watch() .map((event) => getTissues()) .startWith(getTissues()); } …
jakub
  • 3,576
  • 3
  • 29
  • 55
3
votes
1 answer

Observable.just for rxdart: ^0.26.0

I have the new rxdart: ^0.26.0 version, and I know Observable got deprecated and you can use Stream instead, question is, how do I use Observable.just for the newer version?
3
votes
3 answers

How to use StreamZip with StreamBuilder?

I have two stream stream1 stream2 I can give one to StreamBuilder and it work. For example: return StreamBuilder( stream: stream1, But when I combine with StreamZip it now give error: StreamZip combinedStream() { return StreamZip(stream1,…
FlutterFirebase
  • 2,163
  • 6
  • 28
  • 60
3
votes
1 answer

how to compare File/Stream Equality in dart

How can I check Files/Stream equality in dart? Like this: File file1; File file2; file1.equals(file2) // false Or true Or in Streams Like this: Stream stream1; Stream stream2; stream1.equals(Stream2) // false Or true And also…
hossameldinmi
  • 125
  • 1
  • 7
3
votes
4 answers

Flutter - Transform flutter bloc event to add debounce

I am trying to make an Infinite list using flutter bloc. I have taken reference from here:…
Suhas Shelar
  • 963
  • 2
  • 10
  • 23
3
votes
2 answers

RxDart. BehaviorSubject & Distinct

I'm using BehaviorSubject and it's emitting back last item on subscription as expected. However, sometimes, data is not changed and and with new listen event will be triggered back with last emitted item. Would be nice to use distinct to remove…
GensaGames
  • 5,538
  • 4
  • 24
  • 53
1 2
3
21 22