Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: taps should pass through when onTap is unset #32

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AndersKlint
Copy link

@AndersKlint AndersKlint commented Mar 22, 2025

Issue

Fixes: Feature Request: TransformableBox should enable onTap Event Propagation to Child Widgets #31

Problem statement

Currently the TransformableBox captures all tap events and forwards them to the onTap callback. This becomes problematic if we want the content of the TransformableBox to capture onTap events (or whatever is rendered behind the box, in case the content is ignoring pointer events).

Testing

Manual testing have been performed with the following setup:

// pseudo  code
stack: [
  GeastureDetector(
    onTap: _onTap,
    child: CameraPreview()
  ), 
  TransformableBox(
     // ... //
     tapThrough: true,
      },
      contentBuilder: (context, rect, flip) => IgnorePointer(
        child: DecoratedBox(
          decoration: BoxDecoration(
            border: Border.all(
              width: 2,
            ),
          ),
        ),
      ),
    );
]
  • When the onTap arg was provided, the tap event was captured by the TransformableBox.
  • When the onTap arg was not provided, the tap event was captured by the CameraPreview's GestureDetector.

Copy link

docs-page bot commented Mar 22, 2025

To view this pull requests documentation preview, visit the following URL:

docs.page/hyper-designed/box_transform~32

Documentation is deployed and generated using docs.page.

@AndersKlint AndersKlint changed the title feat: add tapThrough property to allow tap passthrough feat: taps should pass through when onTap is unset Mar 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: TransformableBox should enable onTap Event Propagation to Child Widgets
2 participants