Check if the widget is currently visible using bool isVisible() .
Read moreWhat is visibility detector in Flutter?
VisibilityDetector. A VisibilityDetector widget wraps an existing Flutter widget and fires a callback when the widget’s visibility changes . (It actually reports when the visibility of the VisibilityDetector itself changes, and its visibility is expected to be identical to that of its child.)
Read more