capacitor-theme-detection
v0.0.1
Published
Capacitor plugin to detect whether dark mode is enabled
Downloads
5
Readme
capacitor-theme-detection
📱 Capacitor plugin to detect whether dark mode is enabled
Install
npm install capacitor-theme-detection
npx cap sync
API
isDarkModeActive()
isDarkModeActive() => any
Returns: any
addListener('themeModeChange', ...)
addListener(eventName: 'themeModeChange', listenerFunc: (params: { mode: ThemeMode; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
| Param | Type |
| ------------------ | ------------------------------------------------------------------------------- |
| eventName
| 'themeModeChange' |
| listenerFunc
| (params: { mode: ThemeMode; }) => void |
Returns: any
removeAllListeners()
removeAllListeners() => any
Returns: any
Interfaces
PluginListenerHandle
| Prop | Type |
| ------------ | ------------------------- |
| remove
| () => any |
Type Aliases
ThemeMode
'Dark' | 'Light'