Fudge
07/03/2021, 5:08 PMrememberSaveable
is supposed to persist a value across process death. However, I've tried killing the app and restarting it in multiple ways (even cases as simple as 'Live Edit of Literals'!), and every time the state is not persisted. Am I not understanding what rememberSaveable
is actually supposed to do?
A simple example:
var enabled by state { false }
Button(onClick = { enabled = !enabled }) {
Text(text = if (enabled) "enabled" else "disabled")
}
When the app is started, enabled
should have the value it had when the app last closed, but that is not the case. It is not 'remembered' or 'saved', it is forgotten and lost.louiscad
07/03/2021, 5:23 PMFudge
07/03/2021, 5:29 PMlouiscad
07/03/2021, 5:29 PMFudge
07/03/2021, 5:31 PMlouiscad
07/03/2021, 5:31 PMFudge
07/03/2021, 5:32 PMlouiscad
07/03/2021, 5:32 PMFudge
07/03/2021, 5:36 PMlouiscad
07/03/2021, 5:38 PMFunkyMuse
07/03/2021, 6:07 PMArkadii Ivanov
07/03/2021, 7:06 PM