tap method

OffsetIterator<T> tap(
  1. void effect(
    1. T
    ), {
  2. String name = 'tap',
  3. SeedCallback<T>? seed,
  4. int retention = 0,
  5. bool? cancelOnError,
  6. bool bubbleCancellation = true,
})

Implementation

OffsetIterator<T> tap(
  void Function(T) effect, {
  String name = 'tap',
  SeedCallback<T>? seed,
  int retention = 0,
  bool? cancelOnError,
  bool bubbleCancellation = true,
}) =>
    transformIdentical(
      (item) {
        effect(item);
        return [item];
      },
      name: name,
      seed: seed,
      retention: retention,
      bubbleCancellation: bubbleCancellation,
      cancelOnError: cancelOnError,
    );