prefer_method_not_use_calls

Group: style

Maturity: stable

Code Sharp v0.0.1

Since info is static, may be stale
recommendedflutter

View all Lint Rules

Using the Linter

Prefer method direct calls instead of call calls.

BAD:


void fun() {}

void doSomething() {
  fun.call();
}

GOOD:


void fun() {}

void doSomething({VoidCallback? callback}) {
  fun();
  callback?.call();
}