positiveButtonClicks
Create a Flow of positive button click events on the MaterialDatePicker instance when the user confirms a valid selection, where the value emitted is the selection made.
Note: Created flow keeps a strong reference to the MaterialDatePicker instance until the coroutine that launched the flow collector is cancelled.
Example of usage:
datePicker.positiveButtonClicks()
.onEach { selection ->
// handle selection (as a result of positive button click)
}
.launchIn(uiScope)
Content copied to clipboard
Create a Flow of positive button click events on the MaterialTimePicker instance when the user confirms a valid selection, where the value emitted is the selection made.
Note: Created flow keeps a strong reference to the MaterialTimePicker instance until the coroutine that launched the flow collector is cancelled.
Example of usage:
timePicker.positiveButtonClicks()
.onEach {
// handle positive button clicked
}
.launchIn(uiScope)
Content copied to clipboard