ptSerif static method

TextStyle ptSerif({
  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 PT Serif font family from Google Fonts to the given textStyle.

See:

Implementation

static TextStyle ptSerif({
  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(
      '77cd8f3a9ae2f3546135a48656a468afd4312d1ebf5720bb967ebe3a43291fa8',
      260788,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w400,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      'c623ffd63812daa5b0776e75e7a99de63340eb1fa6d3d5692c27a5fe30e21c22',
      263700,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w700,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '8945a761fd4a69fd6eb9b058e025925dd964c9b2cf5cc02b14290746f6aaf356',
      261928,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w700,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      'ab351a82c9e93d363fcb9525df6f6d111fc14e15c3cf0d5e125e77ef0ddf5fd0',
      265096,
    ),
  };

  return googleFontsTextStyle(
    textStyle: textStyle,
    fontFamily: 'PTSerif',
    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,
  );
}