unnecessary_lambdas

Group: style

Maturity: stable

Dart SDK: >= 2.0.0 • (Linter v0.1.30)

Since info is static, may be stale
effective dart

View all Lint Rules

Using the Linter

DON'T create a lambda when a tear-off will do.

BAD:

names.forEach((name) {
  print(name);
});

GOOD:

names.forEach(print);