0
In flutter/Dart Lint (process that parses the code to identify possible errors.) comes by default with some 'flexible' rules that allows an error code to compile and execute.
Such rules can pass up serious errors such as:
FloatingActionButton(
child: Icon(Icons.announcement),
);
warning The parameter 'onPressed' is required
The missing parameter onPressed
cause only one warning
when you really shouldn’t even compile.
Another case that is quite common is the omission of const
which may result in loss of performance, more details here.
Text(
'You have pushed the button this many times:',
),
How to configure Lint to ensure higher code quality?
I don’t know if you’ve found anything specific to the cases you mentioned, but as far as I know there are some predefined rules that can be customized. Also I did not get to use but I will leave here some references that I found that might be useful to you: -https://medium.com/podiihq/setting-up-lint-rules-in-dart-flutter-1ebbed0418a6 (a quick Tuto) / https://dart-lang.github.io/linter/linlints/ (Dart lints) / https://dart.dev/guides/language/analysis-options (reference in doc of Dart)
– Leonardo Paim
@Leonardopaim Thank you, I’ll read the documentation
– rubStackOverflow