MaterialThemeAddon constructor

MaterialThemeAddon({
  1. required List<WidgetbookTheme<ThemeData>> themes,
  2. WidgetbookTheme<ThemeData>? initialTheme,
})

Implementation

MaterialThemeAddon({
  required super.themes,
  super.initialTheme,
}) : super(
        themeBuilder: (context, theme, child) {
          return Theme(
            data: theme,
            child: ColoredBox(
              color: theme.scaffoldBackgroundColor,
              child: DefaultTextStyle(
                style: theme.textTheme.bodyMedium!,
                child: child,
              ),
            ),
          );
        },
      );