You can use the "Inverse" effect on the layout or layer to make every color on screen inverted.
Or when the user presses a button or something then manually set everything you want to be in "Dark Mode", to a darker color, this could be useful if you have many colors other than black/white.
(Blue will turn Orange when inverted) etc.
Hope this helps :)