flutter_leak_radar_lint 0.1.2 copy "flutter_leak_radar_lint: ^0.1.2" to clipboard
flutter_leak_radar_lint: ^0.1.2 copied to clipboard

Custom lint rules for Flutter/Dart: undisposed controllers, uncancelled subscriptions, discarded listen results, and more memory-leak patterns.

0.1.2 #

  • Packaging fix: the published archive no longer ships example/analysis_options.yaml. That file activates the custom_lint analyzer plugin, which pana's downgrade analysis bootstrapped during package scoring; the plugin's own resolve/build failed at the downgraded dependency floors and surfaced as [pub-downgrade-error], costing analysis points. The example still ships its code and README; enable the plugin per the README's "Enable the plugin" section. No rule or behaviour changes — the lint rules are identical to 0.1.1.

0.1.1 #

  • Packaging fix: the published pubspec no longer carries resolution: workspace, which had prevented pub.dev's package analysis from resolving the package standalone (it showed "incomplete analysis" with 0 static-analysis points). No rule or behaviour changes — the lint rules are identical to 0.1.0.
  • Added an example/README.md documenting enablement and what each rule catches.

0.1.0 #

Initial release.

Seven custom_lint rules for common Flutter/Dart memory-leak patterns:

  • undisposed_controller — Flutter controller or FocusNode field not disposed in dispose(). Auto-fix available.
  • uncancelled_subscriptionStreamSubscription field not cancelled in teardown. Auto-fix available.
  • uncancelled_timerTimer field not cancelled in teardown. Auto-fix available.
  • unclosed_stream_controllerStreamController field not closed in teardown. Auto-fix available.
  • missing_remove_listeneraddListener call without a matching removeListener in the teardown path.
  • bloc_uncancelled_subscription.listen() in a BlocBase constructor with no cancel in the subscription lifecycle.
  • discarded_listen_result — bare stream.listen() call whose StreamSubscription return value is discarded.

All rules emit WARNING severity. Rules with auto-fixes synthesise or update dispose() bodies; close() teardowns require manual method creation first.

0
likes
150
points
237
downloads

Documentation

API reference

Publisher

verified publishertp9imka.dev

Weekly Downloads

Custom lint rules for Flutter/Dart: undisposed controllers, uncancelled subscriptions, discarded listen results, and more memory-leak patterns.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#lints #custom-lint #memory #leak-detection #static-analysis

License

MIT (license)

Dependencies

analyzer, custom_lint_builder

More

Packages that depend on flutter_leak_radar_lint