CupertinoThemeAddon constructor

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

Implementation

CupertinoThemeAddon({
  required super.themes,
  super.initialTheme,
}) : super(
        themeBuilder: (context, theme, child) {
          return CupertinoTheme(
            data: theme,
            child: ColoredBox(
              color: theme.scaffoldBackgroundColor,
              child: DefaultTextStyle(
                style: theme.textTheme.textStyle,
                child: child,
              ),
            ),
          );
        },
      );