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(
(context) => [
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.
Libraries
Dart
- dart:ffi
- Foreign Function Interface for interoperability with the C programming language. [...]
- dart:html
- HTML elements and other resources for web-based applications that need to interact with the browser and the DOM (Document Object Model). [...]
- dart:js
- Low-level support for interoperating with JavaScript. [...]
- dart:js_util
- Utility methods to efficiently manipulate typed JSInterop objects in cases where the name to call is not known at runtime. You should only use these methods when the same effect cannot be achieved with @JS annotations. These methods would be extension methods on JSObject if Dart supported extension methods.