iamthevoid
05/21/2021, 8:18 AMisSystemInDarkTheme()
. For example this fun will be called isAppInDarkTheme()
. I also want to recompose all dependent composables.
Which parts and mechanism of compose is better to use to achieve behavior like it?Albert Chang
05/21/2021, 8:26 AMisSystemInDarkTheme()
in compose project template with your isAppInDarkTheme()
and it’ll work.iamthevoid
05/21/2021, 8:32 AMisAppInDarkTheme()
returns some nullable boolean (for example). Returns it when it is set or isSystemInDarkTheme()
if doesn’t. This boolean - where must i store it? state, local provider, something different? When it changes how the composition three will know about it? I must notify something or whatever?Albert Chang
05/21/2021, 8:37 AMState
or a StateFlow
) which stores the user preference. As for what you use as the store, it has nothing to do with Compose.