recursive_getters

Group: style

Maturity: stable

Linter v0.1.30

Since info is static, may be stale
recommendedflutterpedantic

View all Lint Rules

Using the Linter

DON'T create recursive getters.

Recursive getters are getters which return themselves as a value. This is usually a typo.

BAD:

int get field => field; // LINT

BAD:

int get otherField {
  return otherField; // LINT
}

GOOD:

int get field => _field;