VisibilityInfo class

Data passed to the VisibilityDetector.onVisibilityChanged callback.

Annotations

Constructors

VisibilityInfo({required Key key, Size size = Size.zero, Rect visibleBounds = Rect.zero})
Constructor.
const
VisibilityInfo.fromRects({required Key key, required Rect widgetBounds, required Rect clipRect})
Constructs a VisibilityInfo from widget bounds and a corresponding clipping rectangle.
factory

Properties

hashCode → int
The hash code for this object.
no setteroverride
key → Key
The key for the corresponding VisibilityDetector widget.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
size → Size
The size of the widget.
final
visibleBounds → Rect
The visible portion of the widget, in the widget's local coordinates.
final
visibleFraction → double
A fraction in the range [0, 1] that represents what proportion of the widget is visible (assuming rectangular bounding boxes).
no setter

Methods

matchesVisibility(VisibilityInfo info) → bool
Returns true if the specified VisibilityInfo object has equivalent visibility to this one.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override