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 moreHow do I know if my screen is visible in Flutter?
Check if the widget is currently visible using bool isVisible() .
Read more