TakeRange<T> constructor

TakeRange<T>(
  1. Iterable<T> _iterable,
  2. int _count
)

Creates a TakeRange that limits iteration to the first _count elements of _iterable.

Implementation

TakeRange(this._iterable, this._count) {
  if (_count < 0) {
    throw ArgumentError.value(
      _count,
      'count',
      'Must be greater than or equal to zero',
    );
  }
}