<div class='type'>Function</div>


<a id='references'></a>


<h2 id="awaitverticaldragorcancellation-pointerid">awaitVerticalDragOrCancellation</h2>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
suspend fun AwaitPointerEventScope.awaitVerticalDragOrCancellation(
    pointerId: PointerId
): PointerInputChange?
```


Reads pointer input events until a vertical drag is detected or all pointers are up. When the
final pointer is raised, the up event is returned. When a drag event is detected, the drag change
will be returned. Note that if `pointerId` has been raised, another pointer that is down will be
used, if available, so the returned `PointerInputChange.id` may differ from `pointerId`. If the
position change has been consumed by the `PointerEventPass.Main` pass, then the drag is
considered canceled and `null` is returned. If `pointerId` is not down when
`awaitVerticalDragOrCancellation` is called, then `null` is returned.

Example Usage: