WheelPickerCompose
WheelPickerCompose copied to clipboard
Bounces back when it fling or drag to the bottom
There is something wrong with the flingBehavior when use in Dialog or ModalBottomSheet,It will bounces back when it fling or drag to the bottom
问题在于 onScrollFinished 中的 snappedIndex 可能会越界,如下替换可解决问题
val newDayOfMonth =
if (snappedIndex >= dayOfMonths.size) dayOfMonths.last().value
else dayOfMonths.find { it.index == snappedIndex }?.value