Capacitor plugin to support dark mode on Android.
npm install @capawesome/capacitor-android-dark-mode-support
npx cap sync
This plugin will use the following project variables (defined in your app’s variables.gradle
file):
-
$androidxWebkitVersion
version ofandroidx.webkit:webkit
(default:1.9.0
)
No configuration required for this plugin.
A working example can be found here: robingenz/capacitor-plugin-demo
The plugin only needs to be installed.
It enables the correct behavior of the prefers-color-scheme
CSS media feature.
See CHANGELOG.md.
See LICENSE.