ReactiveX / rxdart

The Reactive Extensions for Dart
http://reactivex.io
Apache License 2.0
3.36k stars 272 forks source link

Is there any official package with widgets for flutter? Like the stream builder or similars? #754

Open MiniSuperDev opened 3 months ago

MiniSuperDev commented 3 months ago

Hi

Widgets like Consumer, Listener, Builder` mostly for behavior subjects that can have a sync value.

Thanks

hoc081098 commented 3 months ago

Currently, there is no official package 🙏. But you can use my RxStreamBuilder class in flutter_bloc_pattern package

final stateStream = BehaviorSubject.seeded(1);
RxStreamBuilder<State>(
  stream: stateStream,
  builder: (context, State state) {
    // use state directly
  }
)
MiniSuperDev commented 3 months ago

@hoc081098 Great, although it would be nice if there was something official and agnostic to the bloc pattern, cause it is also used a lot in Flutter.

For example, a complementary .watch and .listen for flutter just like signals do.

Thanks

hoc081098 commented 3 months ago

@MiniSuperDev I will consider adding an official package