prefer_iterable_whereType

Group: style

Maturity: stable

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

Since info is static, may be stale
pedanticeffective dart

View all Lint Rules

Using the Linter

PREFER iterable.whereType<T>() over iterable.where((e) => e is T).

BAD:

iterable.where((e) => e is MyClass)

GOOD:

iterable.whereType<MyClass>()