k2d 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>{
    GoogleFontsVariant(
      fontWeight: FontWeight.w100,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      'd221fa3a362d33d180e193b479bfddbf9e8ab02b545540d3a80121af669090de',
      90864,
    ),
    GoogleFontsVariant(
      fontWeight: FontWeight.w100,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '2ee77370590db6101099fae848e5f0e4fad425bcb6a8bb711390100587eacf49',
      94760,
    ),
    GoogleFontsVariant(
      fontWeight: FontWeight.w200,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '84c5594915b66f9cd68b4acb3820acdf5be79979f881f4edbece711c1a63d0cd',
      90688,
    ),
    GoogleFontsVariant(
      fontWeight: FontWeight.w200,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '989bf534f4958d0d4655079703f5c6788e8cd7b1add81d08a1de93c354d69c1c',
      94820,
    ),
    GoogleFontsVariant(
      fontWeight: FontWeight.w300,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      'bad065e1eeca31036e60587a4472530b8db84eb93149d94f2b687a28c8b0af39',
      90728,
    ),
    GoogleFontsVariant(
      fontWeight: FontWeight.w300,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '1696fa34076cad6a8c919ffbe3247882c29a281086a573ddb8abc0c175794aed',
      94808,
    ),
    GoogleFontsVariant(
      fontWeight: FontWeight.w400,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      'ebd6d32612d7badd90f78a25b0a45e1573bcbd0b93954b702d17188d178d9e87',
      90976,
    ),
    GoogleFontsVariant(
      fontWeight: FontWeight.w400,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      'd7dc126127f8fcfeda097e5da4a1097f60e396ed7c4696060eaa0da6f1727366',
      95068,
    ),
    GoogleFontsVariant(
      fontWeight: FontWeight.w500,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '57c28cc8eae5e455cd2000ea358ed6be014ff9f0e69866e18a1e7b9c6345bce0',
      91356,
    ),
    GoogleFontsVariant(
      fontWeight: FontWeight.w500,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '00dc6e342b171a8e55a277d83326c4612d8f176cd576ee5f666636b13fc4ca18',
      95456,
    ),
    GoogleFontsVariant(
      fontWeight: FontWeight.w600,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '8ceb3795ff3e683d9c70a4d12f431d94434b2527d61dcc11d59f840bfd644a8a',
      91488,
    ),
    GoogleFontsVariant(
      fontWeight: FontWeight.w600,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '3bff6acc9a59d6af0e9d2b3170d55987d1c96e9bb88ff5c20be84053cdb0dd81',
      95596,
    ),
    GoogleFontsVariant(
      fontWeight: FontWeight.w700,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '42e6c8a5b79abf6121af3fc8777219f39b88045a96a42dfe628d28c2112a4e12',
      91500,
    ),
    GoogleFontsVariant(
      fontWeight: FontWeight.w700,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '3d449eedd3718213cee306d0dd007fccf31827c55aa2d25b3d14ca933471e53b',
      95704,
    ),
    GoogleFontsVariant(
      fontWeight: FontWeight.w800,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '8f35ce22ce957eeee7bffef62f142fb7bf751169767ad5ab73cd78ba6c135821',
      91496,
    ),
    GoogleFontsVariant(
      fontWeight: FontWeight.w800,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '2141bd5b98bac331831e687a2131f46a8d23093831953a533451e0081a54f6aa',
      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,
  );
}