count method

  1. @override
int count()
override

Returns the count of elements in the stream.

Example

final count = IntStream.range(1, 10).count(); // 9

Implementation

@override
int count() {
  return _source.length;
}