TakeWhileInclusiveStreamTransformer<S> class
Emits values emitted by the source Stream so long as each value satisfies the given test. When the test is not satisfied by a value, it will emit this value as a final event and then complete.
Example
Stream.fromIterable([2, 3, 4, 5, 6, 1, 2, 3])
.transform(TakeWhileInclusiveStreamTransformer((i) => i < 4))
.listen(print); // prints 2, 3, 4
- Inheritance
-
- Object
- StreamTransformerBase<
S, S> - TakeWhileInclusiveStreamTransformer
Constructors
- TakeWhileInclusiveStreamTransformer(bool test(S))
-
Constructs a StreamTransformer which forwards data events while
test
is successful, and includes last event that causedtest
to return false.
Properties
Methods
-
bind(
Stream< S> stream) → Stream<S> -
Transforms the provided
stream
.override -
cast<
RS, RT> () → StreamTransformer< RS, RT> -
Provides a
StreamTransformer<RS, RT>
view of this stream transformer.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited