Skip to content

spideythewebhead/disposable_container

Repository files navigation

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

  1. Sync or Async callbacks
  2. StreamControllers
  3. StreamSubscriptions
  4. TextEditingController
  5. FocusNode

Getting started

Add the dependency on thep project's pubspec.yaml

dependencies:
  disposable_container: ^0.0.1

Usage

import 'package:disposable_container/disposable_container.dart';

void main() {
  final DisposableContainer disposableContainer = DisposableContainer();

  disposableContainer.addDisposable(() => print('I will be disposed'));

  await disposableContainer.dispose();
}

Find more examples

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages