-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Hi @kdroidFilter Thank you for your great work!
It could be useful to expose PlatformThemeDetector so it can be used outside composable functions — for example, in StateFlows, ViewModels, or other non-UI logic.
Right now it seems limited to composable scope (internal objects), but having access to it globally would make platform theme detection much more flexible.
I mean something like this
expect class PlatformThemeDetector {
// is it possible to retrieve theme Info from the OS? (instead of using `isDark=true` as fallback)
fun isSupported(): Boolean
// these are already implemented however they are not publicly available
fun isDark(): Boolean
fun registerListener(listener: Consumer<Boolean>)
fun removeListener(listener: Consumer<Boolean>)
}Metadata
Metadata
Assignees
Labels
No labels