0 purchases
disposable container
A flutter package that manages dispose callbacks and subscriptions cancellations.
Features #
This package provides helpful classes/mixins and extensions to dispose different flutter resources like
Sync or Async callbacks
StreamControllers
StreamSubscriptions
TextEditingController
FocusNode
Getting started #
Add the dependency on thep project's pubspec.yaml
dependencies:
disposable_container: ^0.0.1
copied to clipboard
Usage #
import 'package:disposable_container/disposable_container.dart';
void main() {
final DisposableContainer disposableContainer = DisposableContainer();
disposableContainer.addDisposable(() => print('I will be disposed'));
await disposableContainer.dispose();
}
copied to clipboard
Find more examples
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.