leak_sentinel 0.1.0 copy "leak_sentinel: ^0.1.0" to clipboard
leak_sentinel: ^0.1.0 copied to clipboard

A custom_lint plugin that finds disposal-based memory leaks in Flutter — undisposed controllers, uncancelled subscriptions and timers — and fixes them with one click.

Changelog #

All notable changes to this project are documented here. The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

Unreleased #

0.1.0 - 2026-07-23 #

Initial release. A custom_lint plugin that detects disposal-based memory leaks in Flutter State classes and offers one-click fixes.

Added #

  • missing_dispose — flags disposable controllers/notifiers (AnimationController, TextEditingController, ScrollController, TabController, PageController, FocusNode, ValueNotifier, and more) that are never disposed in State.dispose().
  • uncancelled_subscription — flags StreamSubscription fields that are never cancelled.
  • uncancelled_timer — flags Timer fields that are never cancelled.
  • One-click quick-fix for every rule: injects the correct release call (dispose() / cancel()) into dispose(), creating the method if absent.
  • Example project wired with expect_lint assertions that double as the integration test.
0
likes
50
points
78
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A custom_lint plugin that finds disposal-based memory leaks in Flutter — undisposed controllers, uncancelled subscriptions and timers — and fixes them with one click.

Repository (GitHub)
View/report issues
Contributing

Topics

#lint #memory-leak #flutter #custom-lint #static-analysis

License

MIT (license)

Dependencies

analyzer, custom_lint_builder

More

Packages that depend on leak_sentinel