prefer_iterable_whereType

Group: style

Maturity: stable

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

View the Project on GitHub dart-lang/linter

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

BAD:

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

GOOD:

iterable.whereType<MyClass>()