Skip to content

Nested GestureDetector should take precedence over parent InkWell #740

@a-h-mzd

Description

@a-h-mzd

Describe the bug

When theres a GestureDetector down the widget tree which has its onTap set, it takes precedence over the InkWell higher up the tree. But this is not the case when it comes to RumUserActionAnnotation 👇🏼

Reproduction steps

final class TestWidget extends StatelessWidget {
  const TestWidget({super.key});

  @override
  Widget build(BuildContext context) {
    return RumUserActionAnnotation(
      description: 'TestWidget',
      attributes: {'placement': 'parent'},
      child: InkWell(
        onTap: () => 'parent tapped',
        child: Container(
          width: 100,
          height: 100,
          color: Colors.white,
          alignment: Alignment.center,
          child: Column(
            mainAxisSize: MainAxisSize.min,
            children: [
              Text('parent'),
              RumUserActionAnnotation(
                description: 'TestWidget - Child',
                attributes: {'placement': 'child'},
                child: GestureDetector(
                  onTap: () => 'child tapped',
                  child: Text('child'),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

SDK logs

No response

Expected behavior

No response

Affected SDK versions

2.10.2

Latest working SDK version

No response

Did you confirm if the latest SDK version fixes the bug?

Yes

Flutter Version

No response

Setup Type

No response

Device Information

No response

Other relevant information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions