publicSans static method

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

See:

Implementation

static TextStyle publicSans({
  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(
      '95425d8c31c56289224ea845c070a7fdb09e951a6c6af125e180241e825a3418',
      56000,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w200,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '711dae8d1ea4ca1d9425cfe75e761ec52a590a9665023f835b3c551b97003309',
      56164,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w300,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '54c6a3f69c8d66dd2a93c0515110bc18266f0aec80442fce8d0568cbed8bd47f',
      56164,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w400,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      'f4a41453a5a6d8f1d1ffbb50a4ec8faa2e6102c46d52d8bbd8e3c91099d1c4c2',
      56128,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w500,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      'c3703872195fd1bffc0f518ad1e2b46d6454110de8a9910196b8a553fdc627a2',
      56116,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w600,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '835eed35c373048de033d5b62eaba4dd1281975011c93bedf63423b8ad4790d1',
      56196,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w700,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '9f49bc2108813ec7bbff80901bd7e110ec7c632fb7bf9199164b517a29d6559e',
      56304,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w800,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '6d320adbe78c159a32ad46693279e1701dd413b4d7d4b3b3966216f2d33a2a84',
      56468,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w900,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      'e56896212ac49011ef1bb74c107724277e94eea950d211636ef935287708d381',
      56408,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w100,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '5a10cfd6c83bf8ed9c425364181dbc6116926a6bb5fc61eea3db8c581e8b6ded',
      58248,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w200,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '0309a9a67a68c1471fceca43c8c787c89896ed9b5e8513e37111e92bef73275c',
      58464,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w300,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      'd174f7374a0cbda5b027d51b0139507b2bbe3b0cfe391eaee912e1205f5eb584',
      58408,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w400,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '5b851ce56994eb1300246087fbd29288751e3f57b63f2ecc98324ad148dae0e1',
      58264,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w500,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      'e1b726e96efc6374fa67e24303547577b8459d751da051167eb6e2637b58bcac',
      58376,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w600,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '9f65c1b1c63028c1c2c08c2f954f92cd2971b209beb83b7f5fced5d34d5ee2d4',
      58500,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w700,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      'c037e259b9334354a38b0fb647ae093461a5a4368bb8e4b3a1ea25bb1d8dceb3',
      58636,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w800,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      'fe6ba2144f9d290de0bfd9408549dc8c795d5639c4316ca4ea4bc4f531d02fd4',
      58844,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w900,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      'fe693c18393e59401e8ff7947d545975d60650a9e3e85021a65e42a6bbb2e755',
      58804,
    ),
  };

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