WhenInViewport constructor

WhenInViewport({
  1. required Stream<ScrollPosition> checkIfInViewport,
  2. int? pixelOffset,
})

load ad when it's in the viewport

Implementation

WhenInViewport({required this.checkIfInViewport, int? pixelOffset})
    : assert(
        checkIfInViewport.isBroadcast,
        'The stream must be of broadcast type.',
      ),
      pixelOffset = pixelOffset ?? 0,
      super._();