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

Constructors

TakeWhileInclusiveStreamTransformer(bool test(S))
Constructs a StreamTransformer which forwards data events while test is successful, and includes last event that caused test to return false.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
test bool Function(S)
Method used to test incoming events
final

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