ThemeAddon<T> constructor

ThemeAddon<T>({
  1. required List<WidgetbookTheme<T>> themes,
  2. WidgetbookTheme<T>? initialTheme,
  3. required ThemeBuilder<T> themeBuilder,
})

Implementation

ThemeAddon({
  required this.themes,
  this.initialTheme,
  required this.themeBuilder,
})  : assert(
        themes.isNotEmpty,
        'themes cannot be empty',
      ),
      assert(
        initialTheme == null || themes.contains(initialTheme),
        'initialTheme must be in themes',
      ),
      super(
        name: 'Theme',
      );