stream_listener 1.0.1 copy "stream_listener: ^1.0.1" to clipboard
stream_listener: ^1.0.1 copied to clipboard

outdated

Flutter widgets the help manage streams and subscriptions. Built in order to reduce the complexity of having to manually subscribe to streams and cancel subscriptions.

stream_listener #

Pub Build Status codecov style: effective dart License: MIT

Flutter widgets the help manage streams and subscriptions. Built in order to reduce the complexity of having to manually subscribe to streams and cancel subscriptions.

StreamListener #

A Widget which manages a Subscription to a Stream and exposes callbacks: onData, onError, and onDone.

StreamListener<int>(
  stream: Stream.fromIterable([0, 1, 2, 3]), // Stream being subscribed to
  onData: (data) {
    // React to the emitted data
  },
  onError: (error) {
    // Optionally handle errors in the Stream
  },
  onDone: () {
    // Optionally react to when the Stream is closed
  },
  cancelOnError: true, // Defaults to false
  child: Container(),
)
10
likes
0
pub points
54%
popularity

Publisher

verified publisherfelangel.dev

Flutter widgets the help manage streams and subscriptions. Built in order to reduce the complexity of having to manually subscribe to streams and cancel subscriptions.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on stream_listener