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.)