Function addDarkSubscriber

Source
addDarkSubscriber(
    subscriber: (dark: boolean) => void,
    notifyImmediately?: boolean,
): () => void

Add a subscriber to dark mode changes and return a function to remove the subscriber

If notifyImmediately is true, the subscriber will be called immediately with the current value