kingsTextTheme static method

TextTheme kingsTextTheme([
  1. TextTheme? textTheme
])

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

See:

Implementation

static TextTheme kingsTextTheme([TextTheme? textTheme]) {
  textTheme ??= ThemeData.light().textTheme;
  return TextTheme(
    displayLarge: GoogleFonts.kings(textStyle: textTheme.displayLarge),
    displayMedium: GoogleFonts.kings(textStyle: textTheme.displayMedium),
    displaySmall: GoogleFonts.kings(textStyle: textTheme.displaySmall),
    headlineLarge: GoogleFonts.kings(textStyle: textTheme.headlineLarge),
    headlineMedium: GoogleFonts.kings(textStyle: textTheme.headlineMedium),
    headlineSmall: GoogleFonts.kings(textStyle: textTheme.headlineSmall),
    titleLarge: GoogleFonts.kings(textStyle: textTheme.titleLarge),
    titleMedium: GoogleFonts.kings(textStyle: textTheme.titleMedium),
    titleSmall: GoogleFonts.kings(textStyle: textTheme.titleSmall),
    bodyLarge: GoogleFonts.kings(textStyle: textTheme.bodyLarge),
    bodyMedium: GoogleFonts.kings(textStyle: textTheme.bodyMedium),
    bodySmall: GoogleFonts.kings(textStyle: textTheme.bodySmall),
    labelLarge: GoogleFonts.kings(textStyle: textTheme.labelLarge),
    labelMedium: GoogleFonts.kings(textStyle: textTheme.labelMedium),
    labelSmall: GoogleFonts.kings(textStyle: textTheme.labelSmall),
  );
}