avoid-nested-futures
preset: recommended
Warns when a Future
type contains another Future
.
Example
❌ Bad:
Future<Future<int>> function() async => ...; // LINT
FutureOr<Future<int>> function() async => ...; // LINT
FutureOr<FutureOr<int>> function() async => ...; // LINT
✅ Good:
Future<int> function() async => ...;
FutureOr<int> function() async => ...;