Exemplo n.º 1
0
        private Task SwitchTheme()
        {
            customTheme = !customTheme;
            if (customTheme)
            {
                var palette = new DefaultPaletteDark();
                ThemeProvider?.UpdateTheme(palette, new DefaultSemanticColorsDark(palette), new DefaultSemanticTextColorsDark(palette));
                dark = $"background-color: {ThemeProvider?.Theme.SemanticColors.BodyBackground}";
            }
            else
            {
                ThemeProvider?.UpdateTheme(new DefaultPalette());
                dark = "";
            }

            return(Task.CompletedTask);
        }