unnecessary_this

Group: style

Maturity: stable

Linter v0.1.30

Since info is static, may be stale
recommendedflutterpedantic

View all Lint Rules

Using the Linter

From the style guide:

DON'T use this when not needed to avoid shadowing.

BAD:

class Box {
  var value;
  void update(new_value) {
    this.value = new_value;
  }
}

GOOD:

class Box {
  var value;
  void update(new_value) {
    value = new_value;
  }
}

GOOD:

class Box {
  var value;
  void update(value) {
    this.value = value;
  }
}