Hi @mhartington
I have the same issue, the Dark mode works fine in desktop browser by using the below code
export class DisplayModeService {
constructor() { }
toggleDisplayMode() {
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)');
prefersDark.addEventListener('change', (mediaQuery) => this.toggleDarkTheme(mediaQuery.matches));
this.toggleDarkTheme(prefersDark.matches);
}
// Add or remove the "dark" class based on if the media query matches
private toggleDarkTheme(shouldAdd) {
document.body.classList.toggle('dark', shouldAdd);
}
}
AppComponent
initializeApp() {
this.platform.ready().then(() => {
this.displayMode.toggleDisplayMode();
this.statusBar.styleDefault();
this.splashScreen.hide();
});
}
but it’s not on the Android device, even after i have added the class='dark'
explicitly.
I think there is some some tips before we push the project.