flutter_leak_radar_lint 0.1.2
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 thecustom_lintanalyzer 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.mddocumenting 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 orFocusNodefield not disposed indispose(). Auto-fix available.uncancelled_subscription—StreamSubscriptionfield not cancelled in teardown. Auto-fix available.uncancelled_timer—Timerfield not cancelled in teardown. Auto-fix available.unclosed_stream_controller—StreamControllerfield not closed in teardown. Auto-fix available.missing_remove_listener—addListenercall without a matchingremoveListenerin the teardown path.bloc_uncancelled_subscription—.listen()in aBlocBaseconstructor with no cancel in the subscription lifecycle.discarded_listen_result— barestream.listen()call whoseStreamSubscriptionreturn value is discarded.
All rules emit WARNING severity. Rules with auto-fixes synthesise or update
dispose() bodies; close() teardowns require manual method creation first.