josefinSlabTextTheme method

TextTheme josefinSlabTextTheme(
  1. [TextTheme textTheme]
)

Applies the Josefin Slab font family from Google Fonts to every TextStyle in the given textTheme.

See:

Implementation

static TextTheme josefinSlabTextTheme([TextTheme textTheme]) {
  textTheme ??= ThemeData.light().textTheme;
  return TextTheme(
    headline1: GoogleFonts.josefinSlab(textStyle: textTheme?.headline1),
    headline2: GoogleFonts.josefinSlab(textStyle: textTheme?.headline2),
    headline3: GoogleFonts.josefinSlab(textStyle: textTheme?.headline3),
    headline4: GoogleFonts.josefinSlab(textStyle: textTheme?.headline4),
    headline5: GoogleFonts.josefinSlab(textStyle: textTheme?.headline5),
    headline6: GoogleFonts.josefinSlab(textStyle: textTheme?.headline6),
    subtitle1: GoogleFonts.josefinSlab(textStyle: textTheme?.subtitle1),
    subtitle2: GoogleFonts.josefinSlab(textStyle: textTheme?.subtitle2),
    bodyText1: GoogleFonts.josefinSlab(textStyle: textTheme?.bodyText1),
    bodyText2: GoogleFonts.josefinSlab(textStyle: textTheme?.bodyText2),
    caption: GoogleFonts.josefinSlab(textStyle: textTheme?.caption),
    button: GoogleFonts.josefinSlab(textStyle: textTheme?.button),
    overline: GoogleFonts.josefinSlab(textStyle: textTheme?.overline),
  );
}