kanit static method

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

See:

Implementation

static TextStyle kanit({
  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(
      '89abc17b0270f8e2a3e8e6efef2ed937be803454ca283ef6c0ac212dccd5db27',
      89304,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w100,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      'b62cc67c0f311b3b9f1f073fbee7969853ff2bb99a291f88779b2b5ecbb8d507',
      93928,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w200,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      'b5ce00d37fe417f5c949eea8241c961cee2b6817824a5785bd29fb21029a5cad',
      88592,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w200,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '9e1117c3aa8a5ac0f7af89e69c9a707781e81805cd16825bf68c6d868604b6d1',
      93544,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w300,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '939503d3fc352e4ab852aeec3f49ac199b6e566cb447b88bc75460552ee42916',
      88744,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w300,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      'f622bca8d685ec98edf87c6326188e9ccd13012b6b1e3337cdfbcd1b1c976bca',
      93564,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w400,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      'aeb8034dc3581ee3c5a3248fcd40691d7bc26199ea13caf373d1c2c7028a549d',
      88056,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w400,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '4cf4b527c73aae5724289c2f394075210c27a9f6545fc8c9b2d9f459b013a457',
      93008,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w500,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '1d33e5da88a4724c9539c98de6e378fc8ae32d5b961142efedd7961cd486915a',
      87548,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w500,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '098a8e7b3e2a73f7ea59df49dfd5ff666a7fe5a6d952137edf4a889725738a87',
      92712,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w600,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '57ca406a73b67768f40cce3167e5bdb469c9bc59bd174a51c52730b860966f54',
      87732,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w600,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '02191a49bca560c28140f3d620b09922ea3fdb64854dfb83eae7ec5da773d13b',
      92928,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w700,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '868f32e8214dff27a45b9d442e65aa6efbe8e3568b4669fe1197da7bfbbfe92b',
      87448,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w700,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      'ff779ef7a17d68f144141d0b928be0ab41905980cc43e950d113163335b3fcf0',
      98732,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w800,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '144413a901c2e7192425dd321a9fd1fcfc2d1fb5045247b76f8cdac74c7a24c0',
      87604,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w800,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '7eb9141ce91ce0562610f9b1260deb759b07d6d73030d86efbdad41d93e6dc36',
      98916,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w900,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '4c1baf318dd15b2200b6656edc8444e26930ae1a44b1fcbb3a5457cd9d394136',
      87400,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w900,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '913792ab374a0576e0f15440efccb10677be9a4aa23cbf667671a63c69799a8e',
      98380,
    ),
  };

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