I would like to chip in about a plugin named WP Dark Mode. The plugin basically does the same thing with media query and frontend button. And the plugin has by default compatibility with other themes and plugins as well.

WP Dark Mode https://wordpress.org/plugins/wp-dark-mode/