stream_subscription_builder 0.1.0+2

Flutter Android iOS web

A package to use and auto-close multiple stream subscriptions in flutter.

stream_subscription_builder #

A package to use and auto-close multiple stream subscriptions in flutter.

Usage #

Use StreamSubscriptionBuilder to subscribe and auto-dispose multiple subscriptions (StreamSubscription).

StreamSubscriptionBuilder(
    () => [
        bloc.stream().listen((event) => event.use((data) => print("Stream data: $data"))),
    ],
    child: Text("Child"),
);

Samples #

You can experiment with sample application hosted here: https://gitlab.com/marcin.jelenski/bloc-showcase

Also test directory contains all stream_subscription_builder use cases.

0
likes
110
pub points
29%
popularity

Publisher

jelenski.net

A package to use and auto-close multiple stream subscriptions in flutter.

Repository (GitLab)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on stream_subscription_builder