Is there an analyzer option I can use in analysis_options.yaml that will notify me when I could use the const keyword? It would be nice to be notified about all the places in my code where I can use it.

Solution 1: Rémi Rousselet

What you're looking for is prefer_const_constructors

Solution 2: jamesdlin

There are a few dartanalyzer lints related to const:


You can see the full list of supported lint rules.