ContentTheme constructor
ContentTheme({
- Color? primary,
- Color? background,
- Color? text,
- List<
ColorToken> colors = const [], - FontFamily? font,
- FontFamily? codeFont,
- 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;