Vaadin Flow 14 ships with light and dark versions of its two bundled themes, Lumo and Material.
And now browsers can ask the host OS for the user’s preference for light or dark modes.
Is there a way to have a Vaadin app automatically use the light or dark theme variant per the user’s wishes?
Marcus Hellberg wrote a helpful post on how to switch light/dark mode theme variants programmatically. I am wondering if Vaadin 14 might be able to switch automatically now that the user preference is detectable from within the browser.
If not, perhaps Someone could show Java code for inquiring about the user’s preference from server-side Java code.