playfairDisplay static method

TextStyle playfairDisplay({
  1. TextStyle? textStyle,
  2. Color? color,
  3. Color? backgroundColor,
  4. double? fontSize,
  5. FontWeight? fontWeight,
  6. FontStyle? fontStyle,
  7. double? letterSpacing,
  8. double? wordSpacing,
  9. TextBaseline? textBaseline,
  10. double? height,
  11. Locale? locale,
  12. Paint? foreground,
  13. Paint? background,
  14. List<Shadow>? shadows,
  15. List<FontFeature>? fontFeatures,
  16. TextDecoration? decoration,
  17. Color? decorationColor,
  18. TextDecorationStyle? decorationStyle,
  19. double? decorationThickness,
})

Applies the Playfair Display font family from Google Fonts to the given textStyle.

See:

Implementation

static TextStyle playfairDisplay({
  TextStyle? textStyle,
  Color? color,
  Color? backgroundColor,
  double? fontSize,
  FontWeight? fontWeight,
  FontStyle? fontStyle,
  double? letterSpacing,
  double? wordSpacing,
  TextBaseline? textBaseline,
  double? height,
  Locale? locale,
  Paint? foreground,
  Paint? background,
  List<ui.Shadow>? shadows,
  List<ui.FontFeature>? fontFeatures,
  TextDecoration? decoration,
  Color? decorationColor,
  TextDecorationStyle? decorationStyle,
  double? decorationThickness,
}) {
  final fonts = <GoogleFontsVariant, GoogleFontsFile>{
    const GoogleFontsVariant(
      fontWeight: FontWeight.w400,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      'fb51f5b03abc84147f255b53f8ba4e26eb801951bcd02f4e5bbb469f17501cfe',
      123176,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w500,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '21aa4812b9962481a929ce5bc4309581a78e34fedf4e61166ac06207aef1cec8',
      123540,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w600,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      'c85a852202cd0004f69eb7b5849c5b6ce7a1e4eed72b66f88594b884a8e9e076',
      123608,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w700,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '0154972f681d9636584473e91b936d4e266c245fa1c57acd7e2d463f1aaf063e',
      123468,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w800,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '0f7c373ab1965afc970d58878085b200f188128a064501367798de985890aeae',
      123540,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w900,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      'cfd7fcaead97191975ad5dd4739ee82ea132a2456ffda19aabc2336fcf1aaafb',
      123464,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w400,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '703fcbb84f656878b064cc3e3835739748352c5886fcfd3237db37fb672e8a59',
      110776,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w500,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      'dc8f9424457983e9f87418308ba06b1977dba87ca4f2da76fbf7d640fa1ce598',
      111128,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w600,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '61f44ef3d9a0d4d381f50d982b4824a103b8af645b5caa423cb48018ae6aad16',
      111160,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w700,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '0ec5d1eacf2266436e7273a1c869703eb23bd60e1b2541486ea67fc1d16c7b31',
      111064,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w800,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '067cc606fa9b01a6d5a6a23a9ba96c1f60a1ec5217b31469ef1eed87ebddc831',
      111048,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w900,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '91fc5ea3e7ec10fd9546cea61dd545a97c236a8eba38989b86e141fdfd651431',
      110688,
    ),
  };

  return googleFontsTextStyle(
    textStyle: textStyle,
    fontFamily: 'PlayfairDisplay',
    color: color,
    backgroundColor: backgroundColor,
    fontSize: fontSize,
    fontWeight: fontWeight,
    fontStyle: fontStyle,
    letterSpacing: letterSpacing,
    wordSpacing: wordSpacing,
    textBaseline: textBaseline,
    height: height,
    locale: locale,
    foreground: foreground,
    background: background,
    shadows: shadows,
    fontFeatures: fontFeatures,
    decoration: decoration,
    decorationColor: decorationColor,
    decorationStyle: decorationStyle,
    decorationThickness: decorationThickness,
    fonts: fonts,
  );
}