stream_subscription_builder 0.1.0+2

Flutter Android iOS web

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

example/main.dart

import 'dart:async';

import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:stream_subscription_builder/stream_subscription_builder.dart';

void main() {
  final controller = StreamController<String>();
  final stream = controller.stream;

  // Create builder instance
  StreamSubscriptionBuilder(
      () => [
            // Subscribe to stream. Subscription will be disposed when StreamSubscriptionBuilder is disposed.
            stream.listen((data) => print("Stream data: $data")),
          ],
      child: Container());
}
0
likes
110
pub points
40%
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