ZetaThemeData constructor

ZetaThemeData({
  1. String fontFamily = kZetaFontFamily,
  2. String identifier = 'default',
  3. ZetaContrast contrast = ZetaContrast.aa,
  4. ZetaColors? colorsLight,
  5. ZetaColors? colorsDark,
  6. Color? primary,
  7. Color? secondary,
})

Constructs a ZetaThemeData.

If primary and/or secondary colors are provided, they will be used to create the light and dark Zeta color palettes.

Implementation

ZetaThemeData({
  this.fontFamily = kZetaFontFamily,
  this.identifier = 'default',
  ZetaContrast contrast = ZetaContrast.aa,
  ZetaColors? colorsLight,
  ZetaColors? colorsDark,
  Color? primary,
  Color? secondary,
})  : _colorsDark = (primary != null
              ? ZetaColors.dark(
                  contrast: contrast,
                  primary: primary.zetaColorSwatch,
                  secondary: secondary?.zetaColorSwatch,
                )
              : (colorsDark ?? ZetaColors.dark()))
          .apply(contrast: contrast),
      _colorsLight = (primary != null
              ? ZetaColors.light(
                  contrast: contrast,
                  primary: primary.zetaColorSwatch,
                  secondary: secondary?.zetaColorSwatch,
                )
              : (colorsLight ?? ZetaColors.light()))
          .apply(contrast: contrast);