Skip to content

Conversation

@LongCatIsLooong
Copy link
Contributor

@LongCatIsLooong LongCatIsLooong commented May 18, 2020

Description

The GestureDetector in each segment should always add itself to the hit entry when the pointer event is within its bounds.

Still, the use of forceToPoint gives the descendants the wrong localPosition.

Related Issues

Fixes #57326.

Tests

I added the following tests:

  • Segment still hittable with a child that has no hitbox

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read Handling breaking changes.

  • No, no existing tests failed, so this is not a breaking change.

@LongCatIsLooong LongCatIsLooong requested review from justinmc and xster May 18, 2020 05:33
@fluttergithubbot fluttergithubbot added f: cupertino flutter/packages/flutter/cupertino repository framework flutter/packages/flutter repository. See also f: labels. labels May 18, 2020
Copy link
Contributor

@justinmc justinmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@fluttergithubbot fluttergithubbot merged commit 89a00fc into flutter:master May 18, 2020
@LongCatIsLooong LongCatIsLooong deleted the segmented-child-hit-test branch May 18, 2020 17:42
pcsosinski pushed a commit to pcsosinski/flutter that referenced this pull request May 26, 2020
pcsosinski pushed a commit that referenced this pull request May 28, 2020
* fix segment hit test behavior (#57461)

* Making DropdownButtonFormField to re-render if parent widget changes (#57037)

* Update DropdownButtonFormField's state if widget updates

Co-authored-by: Shi-Hao Hong <[email protected]>

* throw more specific toolexit when git fails during upgrade (#57162)

* [flutter_tools] Refresh VM state before executing hot reload (#53960)

* Update engine hash for 1.17.2

* Remove MaterialControls from examples/flutter_view (#57621)

Co-authored-by: Jenn Magder <[email protected]>

* Prevent building non-android plugins in build aar (#58018)

* Allow FLUTTER_APPLICATION_PATH to be null for misconfigured Xcode projects (#57701)

* Don't import plugins that don't support android in settings.gradle (#54407)

Co-authored-by: LongCatIsLooong <[email protected]>
Co-authored-by: Pedro Massango <[email protected]>
Co-authored-by: Shi-Hao Hong <[email protected]>
Co-authored-by: Christopher Fujino <[email protected]>
Co-authored-by: Jason Simmons <[email protected]>
Co-authored-by: stuartmorgan <[email protected]>
Co-authored-by: Jenn Magder <[email protected]>
Co-authored-by: Emmanuel Garcia <[email protected]>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

f: cupertino flutter/packages/flutter/cupertino repository framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CupertinoSegmentedControl does not always respond to selections!

4 participants