disposables 0.0.1 disposables: ^0.0.1 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();
}