-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Add no-op callbacks to platform view gesture recognizer when necessary #61671
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
Add no-op callbacks to platform view gesture recognizer when necessary #61671
Conversation
dkwingsmt
left a comment
There was a problem hiding this 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(); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
blasten
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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.
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.
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.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Did any tests fail when you ran them? Please read Handling breaking changes.