0.0.1 ā¢ Published 5 months ago
capacitor-theme-detection v0.0.1
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'
Thanks
0.0.1
5 months ago