range static method

Stream<int> range(
  1. int startInclusive,
  2. int endInclusive
)

Returns a Stream that emits a sequence of Integers within a specified range.

Example

Rx.range(1, 3).listen((i) => print(i)); // Prints 1, 2, 3

Rx.range(3, 1).listen((i) => print(i)); // Prints 3, 2, 1

Implementation

static Stream<int> range(int startInclusive, int endInclusive) =>
    RangeStream(startInclusive, endInclusive);