unnecessary_lambdas

Group: style

Maturity: stable

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

View the Project on GitHub dart-lang/linter

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

BAD:

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

GOOD:

names.forEach(print);