The docs for `isSystemInDarkTheme` mentions: >...
# compose
e
The docs for
isSystemInDarkTheme
mentions:
It is also recommended to provide user accessible overrides in your application, so users can choose to force an always-light or always-dark theme. To do this, you should provide the current theme value in a CompositionLocal or similar to components further down your hierarchy, only calling this effect once at the top level if no user override has been set. This also helps avoid multiple calls to this effect, which can be expensive as it queries system configuration.
1. If this is the recommendation then why doesn't Compose provide that
CompositionLocal
2. I guess Android specific, but the implementation reads
LocalConfiguration.current.uiMode
which doesn't seem like it should be expensive. Did it used to do something more expensive?
l
We should update these docs, it's a bit misleading as written currently. Feel free to file a bug
👍 1
l
Thanks