ContentTheme constructor

ContentTheme({
  1. Color? primary,
  2. Color? background,
  3. Color? text,
  4. List<ColorToken> colors = const [],
  5. FontFamily? font,
  6. FontFamily? codeFont,
  7. ContentTypography? typography,
})

Creates a new theme with the provided colors, fonts and styles.

Implementation

ContentTheme({
  Color? primary,
  Color? background,
  Color? text,
  List<ColorToken> colors = const [],
  FontFamily? font,
  FontFamily? codeFont,
  ContentTypography? typography,
}) : colors = ContentColors._base.apply(
       colors: [
         ...colors,
         if (primary != null) ContentColors.primary.apply(primary),
         if (background != null) ContentColors.background.apply(background),
         if (text != null) ContentColors.text.apply(text),
       ],
     ),
     font = font ?? defaultFont,
     codeFont = codeFont ?? defaultCodeFont,
     typography = typography ?? ContentTypography.base,
     reset = true;