capacitor-dark-theme
v5.0.1
Published
Used to detect dark theme in android and can listen to dark theme changes
Downloads
4
Readme
capacitor-dark-theme
Used to detect dark theme in android and can listen to dark theme changes
Install
npm install capacitor-dark-theme
npx cap sync
API
isDarkThemeOn()
isDarkThemeOn() => Promise<{ isDarkTheme: boolean; }>
Returns: Promise<{ isDarkTheme: boolean; }>
addListener('darkThemeChange', ...)
addListener(eventName: 'darkThemeChange', listenerFunc: (value: { isDarkTheme: boolean; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
| Param | Type |
| ------------------ | ---------------------------------------------------------- |
| eventName
| 'darkThemeChange' |
| listenerFunc
| (value: { isDarkTheme: boolean; }) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
Interfaces
PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove
| () => Promise<void> |