Skip to content

Commit

Permalink
1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hoc081098 committed Oct 6, 2020
1 parent 2bcde99 commit 120ad0e
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.3.1 - Oct 6, 2020

- Add extension for `Iterable<Sink>` and `Iterable<StreamSubscription>`.
- Update docs.

## 1.3.0 - Sep 29, 2020

- Bugfix: `Uncaught Error: Bad state: Cannot add event after closing`.
Expand Down
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,44 @@ main() async {
}
```

### API

## 1. Add, addAll

```dart
Future<bool> DisposeBag.add(StreamSubscription);
Future<bool> DisposeBag.add(Sink);
Future<bool> DisposeBag.addAll(Iterable<StreamSubscription>);
Future<bool> DisposeBag.addAll(Iterable<Sink>);
// extension methods
Future<bool> StreamSubscription.disposedBy(DisposeBag);
Future<bool> Sink.disposedBy(DisposeBag);
Future<bool> Iterable<StreamSubscription>.disposedBy(DisposeBag);
Future<bool> Iterable<Sink>.disposedBy(DisposeBag);
```

## 2. Delete (removes but does not dispose)

```dart
Future<bool> delete(StreamSubscription);
Future<bool> delete(Sink);
```

## 3. Remove (removes and disposes)

```dart
Future<bool> remove(StreamSubscription);
Future<bool> remove(Sink);
```

## 4. Clear, dispose

```dart
Future<bool> clear();
Future<bool> dispose();
```

## Features and bugs

Please file feature requests and bugs at the [issue tracker][tracker].
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: disposebag
description: A package to help disposing Streams and closing Sinks easily.
version: 1.3.0
version: 1.3.1
homepage: https://github.com/hoc081098/disposebag.git
repository: https://github.com/hoc081098/disposebag.git
issue_tracker: https://github.com/hoc081098/disposebag/issues
Expand Down

0 comments on commit 120ad0e

Please sign in to comment.