skipLast method Null safety

Stream<T> skipLast(
  1. int count
)

Starts emitting every items except last count items. This causes items to be delayed.

Example

Stream.fromIterable([1, 2, 3, 4, 5])
  .skipLast(3)
  .listen(print); // prints 1, 2

Implementation

Stream<T> skipLast(int count) =>
    transform(SkipLastStreamTransformer<T>(count));