I was looking at `rememberWindowState` and I've se...
# compose
a
I was looking at
rememberWindowState
and I've seen the examples where a
snapshotFlow
is created based on the parameters of
WindowState
. However, when looking at the interface definition for
WindowState
nowhere a
State
interface member is defined, however when looking at the implementation
WindowStateImpl
it implements the interface using the
by mutableStateOf
convention. For me this is a bit weird. The interface doesn't imply that
snapshotFlow
would work, however it depends purely on the implementation. Am I missing something here?
s
Hmm yeah interesting thought. It's true that if the interface implementation was not backed by compose's mutable state snapshot flow wouldn't work. But in this case it should be safe since you know how it's implemented. I don't know if there's any way for the interface itself to give you this information though, or if there's a planned solution to make it possible.