timer<T> method

Stream<T> timer <T>(
  1. T value,
  2. Duration duration
)

Emits the given value after a specified amount of time.

Example

Rx.timer('hi', Duration(minutes: 1))
    .listen((i) => print(i); // print 'hi' after 1 minute

Implementation

static Stream<T> timer<T>(T value, Duration duration) =>
    (TimerStream<T>(value, duration));