avoid-explicit-type-declaration
Warns when a variable is declared with an explicit type that can be omitted.
Example
❌ Bad:
class SomeClass {
static const String val = '123'; // LINT
final Map<String, String> initedWithType = <String, String>{}; // LINT
final Set<String> elements = {}; // LINT
final (String,) record = ('hello',); // LINT
late final (String,) lazyRecord;
}
✅ Good:
class SomeClass {
static const val = '123';
final initedWithType = <String, String>{};
final elements = <String>{};
final record = ('hello',);
late final (String,) lazyRecord;
}