changeEvents

Create a InitialValueFlow of change events on the SeekBar instance.

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

Example of usage:

seekBar.changeEvents()
.onEach { event ->
when(event) {
SeekBarChangeEvent.ProgressChanged -> {
// handle seek bar progress changed event
}
SeekBarChangeEvent.StartTracking -> {
// handle seek bar start tracking event
}
SeekBarChangeEvent.StopTracking -> {
// handle seek bar stop tracking event
}
}
}
.launchIn(uiScope)