DurationRange.until constructor

DurationRange.until(
  1. Duration stop, [
  2. Duration step = const Duration(seconds: 1)
])

Returns an iterable of integers from 0 inclusive to stop inclusive with step.

print(DurationRange.until(5, 2)); => (0, 2, 4)

Implementation

factory DurationRange.until(Duration stop,
        [Duration step = const Duration(seconds: 1)]) =>
    DurationRange(Duration(), stop, step);