loadTheme method

int loadTheme(
  1. int themeIndex
)

Loads theme at themeIndex.

Implementation

int loadTheme(int themeIndex) {
  var cssTheme = getCSSTheme(themeIndex);

  if (cssTheme != null) {
    loadCSSTheme(cssTheme);
    return themeIndex;
  } else {
    cssTheme = getCSSTheme(defaultThemeIndex);
    loadCSSTheme(cssTheme);
    return defaultThemeIndex;
  }
}