avoid-unnecessary-futures
preset: recommended
Warns when a return type of a declaration is unnecessary wrapped into a Future
.
Example
❌ Bad:
// LINT
Future<String> asyncValue() async => 'value';
class SomeClass {
// LINT
Future<int> asyncMethod() async => 1;
}
✅ Good:
String value() => 'value';
class SomeClass {
int method() => 1;
}