whereState<T extends Object?> method

Stream<T> whereState<T extends Object?>()
inherited

This transformer is a shorthand for Stream.where followed by Stream.cast.

State's that do not match T are filtered out, the resulting Stream will be of Type T.

Implementation

Stream<T> whereState<T extends Object?>() =>
    where((state) => state is T).cast<T>();