matchesVisibility method

bool matchesVisibility(
  1. VisibilityInfo info
)

Returns true if the specified VisibilityInfo object has equivalent visibility to this one.

Implementation

bool matchesVisibility(VisibilityInfo info) {
  // We don't override `operator ==` so that object equality can be separate
  // from whether two [VisibilityInfo] objects are sufficiently similar
  // that we don't need to fire callbacks for both.  This could be pertinent
  // if other properties are added.
  assert(info != null);
  return size == info.size && visibleBounds == info.visibleBounds;
}