Daniele B
03/29/2024, 8:39 AMTeo Vladusic
03/29/2024, 9:33 AMLaunchedEffect
with pickerState.selectedDate
as the key. (don't know if the syntax is 100% right, but I hope you get the point)Stylianos Gakis
03/29/2024, 10:01 AMLaunchedEffect(pickerState) {
snapshotFlow { pickerState.selectedDateMillis }.collectLatest {
println(it) // Here you got the latest selection every time it changes
}
}
Daniele B
03/29/2024, 10:03 AMLaunchedEffect(key1 = pickerState.selectedDateMillis) {
onChangeDateTime(pickerState.selectedDateMillis!!)
}
Any specific reason to use snapshotFlow
instead?Stylianos Gakis
03/29/2024, 10:05 AMDaniele B
03/29/2024, 10:06 AMDaniele B
03/29/2024, 10:07 AMTeo Vladusic
03/29/2024, 10:10 AMTeo Vladusic
03/29/2024, 10:14 AMMaterialTheme(
typography = MaterialTheme.typography.copy(
bodyLarge = TextStyle()
)
) {
// Date picker code
}
Stylianos Gakis
03/29/2024, 10:21 AMDaniele B
03/29/2024, 10:25 AMMaterialTheme(
typography = MaterialTheme.typography.copy(
bodyLarge = TextStyle(fontSize = 10.sp)
)
) {
// Date picker code
}
But it does not affect the spacing:Daniele B
03/29/2024, 10:25 AMStylianos Gakis
03/29/2024, 10:27 AMTeo Vladusic
03/29/2024, 10:28 AMTeo Vladusic
03/29/2024, 10:29 AMDaniele B
03/29/2024, 10:36 AMTeo Vladusic
03/29/2024, 10:37 AMStylianos Gakis
03/29/2024, 10:37 AMDaniele B
03/29/2024, 10:39 AMStylianos Gakis
03/29/2024, 10:39 AMDaniele B
03/29/2024, 10:40 AMStylianos Gakis
03/29/2024, 10:44 AMDaniele B
03/29/2024, 11:45 AMDaniele B
03/29/2024, 11:51 AMStylianos Gakis
03/29/2024, 11:57 AMStefan Oltmann
03/29/2024, 3:31 PMStefan Oltmann
03/29/2024, 3:32 PMStefan Oltmann
03/29/2024, 3:33 PMStefan Oltmann
03/29/2024, 3:35 PMSean Proctor
04/01/2024, 1:58 AM