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 Offset.zero or Rect.zero respectively. This will indicate that the corresponding widget is competely hidden.

Implementation

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