openSans static method

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

See:

Implementation

static TextStyle openSans({
  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.w300,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '8424002d29261ad11298c72f85fa0b7a2968e80cbac587a9bedc4b48b699601e',
      98488,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w400,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '987f9967c4c0e7d02aaf7e0a05ae1b60eb57127d3e114333f05f02fdaba16ed9',
      98524,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w500,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '762ca8d4520678f189b85c75f77e0a38f58d7f1baaac92ce7ea79593474731a1',
      98668,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w600,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '3a1fa7036f2ef7be8ff6eef688ad7a0b44c4a0092dccd9a7ff38a2bfc416e90c',
      98432,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w700,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      'c1a4ac0f9d9edcb71f32d358500c1a17ce863b86ca4cafbc55c9e493a609a7ba',
      98508,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w800,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      'e1ef91617554b5eb76b6503f3ec7098c07458beaca3890c1240b750598e32fea',
      98920,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w300,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '5dd3312c42c4ead17260487a2194479ecfb7d4a06c712e01695350ae42833fba',
      104080,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w400,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      'a4f605780a87da0dfb6b4bb2ecddd4a0c1e8ba2c33b58a7d316026d6f825c4b1',
      103804,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w500,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '6110d1435d0e7daf6611b6031a3ac3031ea4ee479446cad5ff9998602721b17f',
      103976,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w600,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '254dbfe521bbe0ec86cdd93284bf5b31bf9e381fc6112657dec906d397f7f389',
      103948,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w700,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '36d9ac81408dace4bb96910c87b74d731d983cb3fade0b5e86e3e3a5e7200103',
      103520,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w800,
      fontStyle: FontStyle.italic,
    ): GoogleFontsFile(
      '7cb85f34f719519c479596a24f3f68e946756fae60faca529953f8c6284d0a90',
      104084,
    ),
  };

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