addThemes<T extends ThemeColor> method

void addThemes<T extends ThemeColor>(
  1. List<BaseThemeConfig<T>> themes, {
  2. String? initialThemeId,
})

Add themes to Nylo.

themes - List of theme configurations to register. initialThemeId - Optional theme ID to use on first launch. If not provided, the system brightness will be used to select a matching theme.

Example:

nylo.addThemes(appThemes);
// Or with initial theme:
nylo.addThemes(appThemes, initialThemeId: 'light_theme');

Implementation

void addThemes<T extends ThemeColor>(
  List<BaseThemeConfig<T>> themes, {
  String? initialThemeId,
}) {
  NyThemeManager.instance.registerThemes(
    themes,
    initialThemeId: initialThemeId,
  );
}