Document PointerChange and PointerDeviceKind#34059
Document PointerChange and PointerDeviceKind#34059auto-submit[bot] merged 6 commits intoflutter:mainfrom
Conversation
|
cc @moffatman |
|
I've discussed with @/moffatman and verified that the contents are correct. |
lib/ui/pointer.dart
Outdated
| invertedStylus, | ||
|
|
||
| /// A touch-based pointer device with an indirect surface. | ||
| /// Gestures from a touch-based pointer device with an indirect surface. |
There was a problem hiding this comment.
It would be helpful to explain what's meant by "indirect surface".
There was a problem hiding this comment.
I've changed it to
/// Gestures from a trackpad.
///
/// A trackpad here is defined as a touch-based pointer device with an
/// indirect surface (the user operates the screen by touching something that
/// is not the screen).Let me know if it makes sense.
lib/ui/pointer.dart
Outdated
| /// On supporting platforms, when the user is operating on a physical | ||
| /// trackpad, events with kind [trackpad] are dispatched when the user | ||
| /// performs gestures on the trackpad, such as panning, zooming, scrolling, | ||
| /// or rotating. The [trackpad] kind is only found with [PointerChange] `add`, |
There was a problem hiding this comment.
I don't know anything about the class being documented here but: I can't parse the sentence that begins "The [trackpad] kind ..."
There was a problem hiding this comment.
I've made it into an independent paragraph and rephrased it as follows:
/// Events with kind [trackpad] can only have a [PointerChange] of `add`,
/// `remove`, and pan-zoom related values.Does it make more sense now?
justinmc
left a comment
There was a problem hiding this comment.
Thanks for improving the docs!
lib/ui/pointer.dart
Outdated
| /// | ||
| /// When the user is operating with a trackpad on iOS (for example, Magic | ||
| /// Keyboard on iPad), clicking will also dispatch events with kind [touch] if | ||
| /// `Info.plist` is not present or returns NO for |
There was a problem hiding this comment.
Nit: I think this sounds slightly better but it's up to you, not a big difference.
"or returns" => "or it returns"
There was a problem hiding this comment.
Thanks for finding this, I actually wrote it wrong. I've changed it to:
/// [...] if `UIApplicationSupportsIndirectInputEvents` is not present in `Info.plist`
/// or returns NO.Does it sound right now?
There was a problem hiding this comment.
Sounds good to me, thanks!
lib/ui/pointer.dart
Outdated
| invertedStylus, | ||
|
|
||
| /// A touch-based pointer device with an indirect surface. | ||
| /// Gestures from a touch-based pointer device with an indirect surface. |
|
Thank you all for the comments. I think I've addressed all of them. Can you take another look? |
This PR adds some documentation to
PointerChangeandPointerDeviceKind.The relationship between them and the situation for the values have been complicated with the addition of support for trackpad.
Pre-launch Checklist
writing and running engine tests.
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.