prefer_is_not_operator

Group: style

Maturity: stable

Linter v0.1.102

Since info is static, may be stale
recommendedflutter

View all Lint Rules

Using the Linter

When checking if an object is not of a specified type, it is preferable to use the 'is!' operator.

BAD:

if (!(foo is Foo)) {
  ...
}

GOOD:

if (foo is! Foo) {
  ...
}