whereStates<T extends Object?> method
This transformer leaves only the necessary states with downcast to T
State
's that do not match T
are filtered out,
the resulting Stream will be of Type T
.
Implementation
Stream<T> whereStates<T extends Object?>(bool Function(State state) filter) =>
where(filter).where((state) => state is T).cast<T>();