import { ThemeDetection } from '@awesome-cordova-plugins/theme-detection';
constructor(private themeDetection: ThemeDetection) { }
...
this.themeDetection.isAvailable()
.then((res: ThemeDetectionResponse) => {
if(res.value) {
this.themeDetection.isDarkModeEnabled().then((res: ThemeDetectionResponse) => {
console.log(res);
})
.catch((error: any) => console.error(error));
}
})
.catch((error: any) => console.error(error));