setThemeByName method

void setThemeByName(
  1. String name
)

Sets the theme by name.

If the theme is not found, ThemesDatasource.defaultTheme will be used.

Implementation

void setThemeByName(String name) {
  setTheme(
    _themes.getThemes().firstWhere(
          (element) => element.name == name,
          orElse: _themes.systemTheme,
        ),
  );
}