Skip to content

Conversation

@cyanglaz
Copy link
Contributor

@cyanglaz cyanglaz commented Jul 16, 2020

Description

After #31935, Some one sequence gesture recognizers requires at least one callback to be able to compete in the arena. This PR adds the a no-op callback in the gesture recognizer in the platform view when the gesture recognizer does not have any callbacks. This way, all the gesture recognizers in the platform view can compete in the arena.

Related Issues

Fixes #35394

Tests

I added the following tests:

UiKitView drag gesture recognizers
UiKitView tap gesture recognizers
UiKitView long press gesture recognizers
PlatformView drag gesture recognizers
PlatformView tap gesture recognizers
PlatformView long press gesture recognizers

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.

@fluttergithubbot fluttergithubbot added the framework flutter/packages/flutter repository. See also f: labels. label Jul 16, 2020
@cyanglaz cyanglaz requested review from blasten and dkwingsmt July 16, 2020 23:18
Copy link
Contributor

@dkwingsmt dkwingsmt left a comment

Choose a reason for hiding this comment

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

LGTM except for one comment

_gestureRecognizers = gestureRecognizerFactories.map(
(Factory<OneSequenceGestureRecognizer> recognizerFactory) {
return recognizerFactory.constructor()..team = team;
final OneSequenceGestureRecognizer gestureRecognizer = recognizerFactory.constructor();
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a comment to explain here. Probably link to the comment that proposed the workaround.

Copy link

Choose a reason for hiding this comment

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

+1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link

@blasten blasten left a comment

Choose a reason for hiding this comment

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

LGTM

@cyanglaz cyanglaz merged commit 30e556d into flutter:master Jul 17, 2020
@cyanglaz cyanglaz deleted the platform_view_gesture_callback branch July 17, 2020 19:13
@cyanglaz cyanglaz restored the platform_view_gesture_callback branch August 5, 2020 17:15
Pragya007 pushed a commit to Pragya007/flutter that referenced this pull request Aug 11, 2020
flutter#61671)

After flutter#31935, Some one sequence gesture recognizers requires at least one callback to be able to compete in the arena. This PR adds the a no-op callback in the gesture recognizer in the platform view when the gesture recognizer does not have any callbacks. This way, all the gesture recognizers in the platform view can compete in the arena.
mingwandroid pushed a commit to mingwandroid/flutter that referenced this pull request Sep 6, 2020
flutter#61671)

After flutter#31935, Some one sequence gesture recognizers requires at least one callback to be able to compete in the arena. This PR adds the a no-op callback in the gesture recognizer in the platform view when the gesture recognizer does not have any callbacks. This way, all the gesture recognizers in the platform view can compete in the arena.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

webview_flutter: Nested scrolling with WebView no longer works

5 participants