VisibilityInfo constructor

const VisibilityInfo({
  1. required Key key,
  2. Size? size,
  3. Rect? visibleBounds,
})

Constructor.

key corresponds to the Key used to construct the corresponding VisibilityDetector widget. Must not be null.

If size or visibleBounds are omitted or null, the VisibilityInfo will be initialized to Size.zero or Rect.zero respectively. This will indicate that the corresponding widget is completely hidden.

Implementation

const VisibilityInfo({
  required this.key,
  Size? size,
  Rect? visibleBounds,
})  : size = size ?? Size.zero,
      visibleBounds = visibleBounds ?? Rect.zero;