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…
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…
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…
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…
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…
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…
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…
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 =>…
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…
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());
}
…
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?
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,…
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…
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…