IntersectionObserverLayer constructor

IntersectionObserverLayer({
  1. required Size elementSize,
  2. required Offset paintOffset,
  3. required IntersectionChangeCallback? onIntersectionChange,
  4. required Rect intersectPadding,
})

Implementation

IntersectionObserverLayer(
    {required Size elementSize, required Offset paintOffset, required this.onIntersectionChange, required Rect intersectPadding})
    : // TODO: This is zero for box element. For sliver element, this offset points to the start of the element which may be outside the viewport.
      _elementOffset = Offset.zero,
      _elementSize = elementSize,
      _intersectPadding = intersectPadding,
      _paintOffset = paintOffset;