Widgetbook's UI Theme

If you want to change some Widgetbook's UI colors, or want to enforce a specific theme mode, you can do so using these parameters:

ParameterDescription
lightThemeThemeData that is used when themeMode is ThemeMode.light
darkThemeThemeData that is used when themeMode is ThemeMode.dark.
themeModeControls which ThemeMode to use. Defaults to ThemeMode.system.
@override
Widget build(BuildContext context) {
  return Widgetbook(
    lightTheme: ThemeData.light(), // Custom light theme
    darkTheme: ThemeData.dark(),   // Custom dark theme
    themeMode: ThemeMode.light,    // Forcing light mode
    // ...
  );
}