Radio Sheet Builder
constructor(title: String = "请选择", items: Set<T>, itemText: (T) -> String = { it.toString() }, selectedItem: T = items.first(), showButton: Boolean = true, cancelText: String = "取消", confirmText: String = "确定", onCancelClick: suspend CoroutineScope.() -> Boolean = { true }, onConfirmClick: suspend CoroutineScope.(T) -> Boolean = { true })
Parameters
title
标题文字,默认 "请选择"
items
选项数据集合,要求非空
item Text
选项文本转换函数,默认调用 toString()
selected Item
当前选中的项,默认为第一项
show Button
是否显示确定和取消按钮,默认 true
cancel Text
取消按钮文字,默认 "取消"
confirm Text
确定按钮文字,默认 "确定"
on Cancel Click
取消按钮点击回调,返回 true 则自动关闭弹窗
on Confirm Click
确定按钮点击回调,参数为选中的项,返回 true 则自动关闭弹窗
Type Parameters
T
选项数据类型