Skip to content

GestureDetector onPanUpdate is also called in addition to the size of the parent node #52079

@SnowLittleStone

Description

@SnowLittleStone

When I move outside the parent component, onPanUpdate also calls
example:

      body: Center(
        child: Container(
          width: 300,
          height: 300,
          color: Colors.red,
          child: GestureDetector(onPanUpdate: (DragUpdateDetails details) {
            RenderBox referenceBox = context.findRenderObject();
            Offset localPosition =
                referenceBox.globalToLocal(details.globalPosition);
            print('---------------localPosition:$localPosition');
          }),
        ),
      ),

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: qualityA truly polished experiencef: gesturesflutter/packages/flutter/gestures repository.found in release: 1.20Found to occur in 1.20frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions