recursive_getters

Group: style

Maturity: stable

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

Since info is static, may be stale
pedantic

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;