Did you know?

Forgetting to dispose controllers in your State class can lead to memory leaks.

DCM has a handy “dispose-fields” rule that warns you about it.

And with a bit of help from Copilot, you can even fix this automatically. 👍

Disposing fields to avoid memory leaks
Disposing fields to avoid memory leaks

To get started with DCM, you can read the Quick Start guide

Once you’ve registered your license key and installed the VSCode extension or IntelliJ plugin, simply add this to your analysis_options.yaml, and you’re good to go:

dart_code_metrics:
  extends:
    - recommended

Happy coding!