Single Selector
class SingleSelector<T>(selectedItem: T? = null, safeChanges: Boolean = true) : Selector<T>
Content copied to clipboard
Realization of Selector with one or without selected element. This realization will always have empty selectedItems when nothing selected and one element in selectedItems when something selected. Contains selectedItem value for simple access to currently selected item.
On calling of toggleSelection previous selection will be erased and itemUnselected will emit this element.
Parameters
safe Changes
Set to false to disable using of mutex for synchronizing changes on toggleSelection
Constructors
Link copied to clipboard
fun <T> SingleSelector(selectedItem: T? = null, safeChanges: Boolean = true)
Content copied to clipboard