disposebag 1.1.0
disposebag: ^1.1.0 copied to clipboard
A package to help disposing Streams and closing Sinks easily.
disposebag #
Author: Petrus Nguyễn Thái Học #
A package to help disposing Streams and closing Sinks
Usage #
A simple usage example:
import 'package:disposebag/disposebag.dart';
import 'dart:async';
main() async {
final controllers = <StreamController>[];
final subscriptions = <StreamSubscription>[];
final bag = DisposeBag([...subscriptions, ...controllers]);
await bag.dispose();
print("Bag disposed. It's all good");
}
Features and bugs #
Please file feature requests and bugs at the issue tracker.