Slide 28
Slide 28 text
©Copyright 2021 BEARTAIL Inc.
作っているアプリの実装紹介
(例) ステータス値入力用のTextField
@Composable
fun IdolStatusForm(
label: String,
status: IdolStatus,
onStateChange: (IdolStatus) -> Unit,
) {
val (_, dispatch) = provideInputFormDispatcher()
LaunchedEffect(status) {
val (vocal, dance, visual, mental) = status.toInt()
dispatch(vo = vocal, da = dance, vi = visual, me = mental)
}
Row {
StatusTextField(
status.vocal,
label = "Vo",
focusedColor = vocalColor,
onChangeValue = { onStateChange(status.copy(vocal = it)) },
modifier = Modifier.weight(1F),
)
…