Superpower Flutter Code Insights With Static Analysis
Computer language compilers are lazy, as if we made an attempt for them to do every task, it would take days to compile apps. The way we pass on the tasks that we cannot assign to the dart compiler is through static analysis of that dart code of our flutter app under development. I am going to show you a more opinionated set-up that is easier to maintain and use in getting insight to flutter app code.
Dart Analyzer
At the heart of being able to static analyze dart code is a Dart tool called analyzer and a Dart Analysis Server:
The configuration of the scanning is accomplished by the project analysis options YAML file. The analysis options YAML contains these blocks:
-Include
The include declaration is at the beginning of the file, and we use it if we want to point to a specific lint rule-set so that we are not expending a lot of time maintaining our own lint rule set. For example, to use Passy’s lint rule set, we specify the flutter package import in pubspec and then list the…