swipeDismissDragStateChanges

Create a Flow of drag state change events on the View instance with a SwipeDismissBehavior where the value emitted can be one of STATE_IDLE, STATE_DRAGGING} or STATE_SETTLING.

Note: Created flow keeps a strong reference to the View instance until the coroutine that launched the flow collector is cancelled.

Example of usage:

view.dragStateChanges()
.onEach { state ->
// handle state
}
.launchIn(uiScope)