avoid_void_async

Group: style

Maturity: stable

Linter v0.1.60

Since info is static, may be stale

View all Lint Rules

Using the Linter

DO mark async functions to return Future.

When declaring an async method or function which does not return a value, declare that it returns Future and not just void.

BAD:

void f() async {}
void f2() async => null;

GOOD:

Future<void> f() async {}
Future<void> f2() async => null;