-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Add [pointerCount] property to Scale Gesture Details #73474
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
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 tiny format issues
| /// | ||
| /// The [velocity] argument must not be null. | ||
| ScaleEndDetails({ this.velocity = Velocity.zero }) | ||
| ScaleEndDetails({ this.velocity = Velocity.zero, this.pointerCount = 0, }) |
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.
| ScaleEndDetails({ this.velocity = Velocity.zero, this.pointerCount = 0, }) | |
| ScaleEndDetails({ this.velocity = Velocity.zero, this.pointerCount = 0 }) |
I've searched around the repo and have found 2 use cases of , }), including one in this file. It's safe to assume to be a typo.
| /// | ||
| /// The [focalPoint] argument must not be null. | ||
| ScaleStartDetails({ this.focalPoint = Offset.zero, Offset? localFocalPoint, }) | ||
| ScaleStartDetails({ this.focalPoint = Offset.zero, Offset? localFocalPoint, this.pointerCount = 0, }) |
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.
| ScaleStartDetails({ this.focalPoint = Offset.zero, Offset? localFocalPoint, this.pointerCount = 0, }) | |
| ScaleStartDetails({ this.focalPoint = Offset.zero, Offset? localFocalPoint, this.pointerCount = 0 }) |
Context addresses #13101 (comment) and #13102
Adding
pointerCountproperty to scale gesture details is useful for developers. Use it to distinguish the scale caused by pan(one finger) and zoom(more than one finger) gesture.CC @Hixie
Fixes #13102
Fixes #49025