IntervalStreamTransformer<S> class
Creates a Stream that emits each item in the Stream after a given duration.
Example
Stream.fromIterable([1, 2, 3])
.transform(IntervalStreamTransformer(Duration(seconds: 1)))
.listen((i) => print('$i sec')); // prints 1 sec, 2 sec, 3 sec
- Inheritance
-
- Object
- StreamTransformerBase<
S, S> - IntervalStreamTransformer
Constructors
- IntervalStreamTransformer(Duration duration)
- Constructs a StreamTransformer which emits each item from the source Stream, after a given duration.
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