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