disposables 1.0.0 disposables: ^1.0.0 copied to clipboard
Simple library to manage objects needing to release its own resources.
example/disposables_example.dart
import 'dart:async';
import 'package:disposables/disposables.dart';
main() {
final sink = StreamController();
final disposable = Disposable(() => sink.close());
disposable.dispose();
}