k2d static method

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

See:

Implementation

static TextStyle k2d({
  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.w100,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      'f3feeef22df3aa25d211a79fb1b886a2b850ee133cdd563420b234f95592e8d9',
      90864,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w100,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      'c68be444fb83fbe462c9d3cf49e324fa0bb3c82a5280754377f93304c9d43fc2',
      94760,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w200,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '71198cb12976979fb9ce0ab42e5b6113e85a9a9369334c676343a998db2579a7',
      90688,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w200,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '222d20b60bf5b09b9de37379e5c00c7b3457f409095495463435165f470dfa88',
      94820,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w300,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '9d8fed4c95e12c5a12a3cca3e9a618c0451a169cea16d31b5b4bf0ab2489ea3d',
      90728,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w300,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '9d8fa039a163d6eb70365ff27b15a5b86af96efa7da3f6067786d5bb3ea04f82',
      94808,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w400,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      'd6ad4e81d0f72f6825177620309937e71ca6cfa9e00a6bcb1c5b1d5b9b21669a',
      90976,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w400,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      'ab22474bc9931b174440dcbacc196dbd47c206be5a93e916f7b45e8489524eef',
      95068,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w500,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      'e15ec7a279a3520f129d2acf396079d9cd36edea7fb8b3ace89f00614fa4e730',
      91356,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w500,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '258e6e38f16cc4f837846f3bf1e965e8bd9f687a5c9a7fa2bf0b04a7387d809d',
      95456,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w600,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      'bae195bea158d45183260bd3c560fd4140dbcd1dbd72dad4fc4349901eca6c6a',
      91488,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w600,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '2b70bda904337f52ff80fda13701a449fae3eaead1ad7e97882cda3588f4bb06',
      95596,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w700,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '04c5c6fac3af5533d4f5aa6ec422da7a1759ccee4087a4ffe976df28e1064d99',
      91500,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w700,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '20eaf0c8b8fc420ef496850949e3f6852d633c196fc08855d954e89bfba33e59',
      95704,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w800,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      'a32273d889f7e8d98cd9ee1a23902f9c18273caa9e7af39fdc20dad46dd84711',
      91496,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w800,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '87b86d27326593b40539e3645cb684c416ee80453ccf8819682a8252f33a1b65',
      95800,
    ),
  };

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