mPlus2 static method

TextStyle mPlus2({
  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 M PLUS 2 font family from Google Fonts to the given textStyle.

See:

Implementation

static TextStyle mPlus2({
  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(
      '8c1128cb9960232c4b141fc182e51183bc6f4e82811397ab3760cf95cc2cd741',
      1748452,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w200,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '23fe79aebbafd260ce04d28fd8e15a32674bf8dbaea7163893da63604a134222',
      1749132,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w300,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      'c0f813036e87fcc3390a0f0c7c2b274846441f92e69fa4488d2cf3c7eba0b309',
      1746688,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w400,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '4690a0d234a545a1e205f7d69017b5aac0393adb3a14486708fd89e14218df18',
      1743140,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w500,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '82060fb17c5923eaa25f8eb0177362a92286d0a4a6521068cb7732d214172c09',
      1738568,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w600,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '06dc987c18cac93d657545bd14c4f313ddac1975c1ddc3ad1dd4c401c451f122',
      1737700,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w700,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '8430d9dcff67eb5b4cc0f1562dc8789afe84caad9b79eb30fb5d9197d7ab07a3',
      1736056,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w800,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '7e855cd52cf93fb11051e880d080147cf5ed7e8eadcb568755814114f6c03a49',
      1733036,
    ),
    const GoogleFontsVariant(
      fontWeight: FontWeight.w900,
      fontStyle: FontStyle.normal,
    ): GoogleFontsFile(
      '205978c8b8bc6b4c1488c7ab4a4639592d07f29d2886050f23212b8918cd38e4',
      1726688,
    ),
  };

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