dropdownMenu
val selectListInfo by DataViewModel.uiState.collectAsState()
val selectIndex by remember { mutableStateOf(mutableListOf(0)) }
dropdownMenu(selectListInfo, selectIndex) { _, s ->
selectIndex[0] = s
}
DataViewModel类uiState为StateFlow状态流 使用之后后者数据集显示随之改变
var oneSelectState by remember { mutableStateOf(false) }
radioButton(
listOf<UiState>(
UiState(
"单数据测试",
oneSelectState
)
), oneSetSelectState = {
oneSelectState = it
})
val moreSelectState by RadioInfoViewModel.uiState.collectAsState()
radioButton(
moreSelectState
) { index, state ->
//实现单选或者多选逻辑皆可自定义
RadioInfo.update(index, state)
}
fun main() = application {
initNotification(
appName,
painterResource(wxData[0].selectedPath)
)
}
NotificationKt.sendNotification("消息内容")
tooltip(ToolTipInfo("本地测试")) {
Text("DEBUG", color = Color.White)
}