Toggles the application theme between dark and light modes.
Returns Promise<boolean>
A promise that resolves to true if dark mode is enabled, false otherwise.
Source
exportasyncfunctiontoggleTheme() { const { local } = awaitgetCurrentTheme(); // If current theme is dark or not set, switch to light, otherwise switch to dark constnewTheme = local === "dark" ? "light" : "dark";
Toggles the application theme between dark and light modes.