File tree Expand file tree Collapse file tree 3 files changed +44
-1
lines changed
Expand file tree Collapse file tree 3 files changed +44
-1
lines changed Original file line number Diff line number Diff line change 1+ ## 1.3.1 - Oct 6, 2020
2+
3+ - Add extension for ` Iterable<Sink> ` and ` Iterable<StreamSubscription> ` .
4+ - Update docs.
5+
16## 1.3.0 - Sep 29, 2020
27
38- Bugfix: ` Uncaught Error: Bad state: Cannot add event after closing ` .
Original file line number Diff line number Diff line change @@ -35,6 +35,44 @@ main() async {
3535}
3636```
3737
38+ ### API
39+
40+ ## 1. Add, addAll
41+
42+ ``` dart
43+ Future<bool> DisposeBag.add(StreamSubscription);
44+ Future<bool> DisposeBag.add(Sink);
45+ Future<bool> DisposeBag.addAll(Iterable<StreamSubscription>);
46+ Future<bool> DisposeBag.addAll(Iterable<Sink>);
47+
48+ // extension methods
49+ Future<bool> StreamSubscription.disposedBy(DisposeBag);
50+ Future<bool> Sink.disposedBy(DisposeBag);
51+ Future<bool> Iterable<StreamSubscription>.disposedBy(DisposeBag);
52+ Future<bool> Iterable<Sink>.disposedBy(DisposeBag);
53+ ```
54+
55+ ## 2. Delete (removes but does not dispose)
56+
57+ ``` dart
58+ Future<bool> delete(StreamSubscription);
59+ Future<bool> delete(Sink);
60+ ```
61+
62+ ## 3. Remove (removes and disposes)
63+
64+ ``` dart
65+ Future<bool> remove(StreamSubscription);
66+ Future<bool> remove(Sink);
67+ ```
68+
69+ ## 4. Clear, dispose
70+
71+ ``` dart
72+ Future<bool> clear();
73+ Future<bool> dispose();
74+ ```
75+
3876## Features and bugs
3977
4078Please file feature requests and bugs at the [ issue tracker] [ tracker ] .
Original file line number Diff line number Diff line change 11name : disposebag
22description : A package to help disposing Streams and closing Sinks easily.
3- version : 1.3.0
3+ version : 1.3.1
44homepage : https://github.com/hoc081098/disposebag.git
55repository : https://github.com/hoc081098/disposebag.git
66issue_tracker : https://github.com/hoc081098/disposebag/issues
You can’t perform that action at this time.
0 commit comments