Skip to content
This repository was archived by the owner on Oct 13, 2025. It is now read-only.
This repository was archived by the owner on Oct 13, 2025. It is now read-only.

VisibilityDetector reports widget as visible even when covered by a fullscreen dialog #561

@nikkieke

Description

@nikkieke

Problem description

I’m using the visibility_detector package to track when a widget is visible to the user. However, I’ve noticed that if the widget is covered by a fullscreen dialog, the detector still reports it as visible.

This causes incorrect behavior in scenarios where I want to pause/resume activity depending on whether the widget is truly visible to the user.

Steps to reproduce

  1. Place a VisibilityDetector around any widget.
  2. Trigger a fullscreen Dialog (e.g., showDialog with barrierDismissible: true and full-screen child).
  3. Observe that VisibilityDetector still reports visibleFraction = 1.0.

Expected behavior

The VisibilityDetector should detect that the widget is no longer visible to the user when it’s covered by a fullscreen dialog.

Actual behavior

The VisibilityDetector continues to report visibleFraction = 1.0, even though the widget is completely covered.

Environment

Flutter version: 3.29.0

visibility_detector: 0.4.0+2

Platform: Android & iOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions