Is Dark

Reflects if it is dark outside.

This is decided based on the time of the day. You may want to show a dark theme when it is dark to improve the user experience.

const onIsDarkChange = (value: boolean, timestamp?: Date) => {
    console.log(value, timestamp);
};


COBI.app.isDark.read(onIsDarkChange); // Instantly get the current value
COBI.app.isDark.subscribe(onIsDarkChange);
COBI.app.isDark.unsubscribe(onIsDarkChange);
pagePlacemark

Last updated