toTextTheme method

TextTheme toTextTheme()

Maps Kite typography into Flutter's Material TextTheme.

Implementation

TextTheme toTextTheme() {
  return TextTheme(
    // Display
    displayLarge: display,
    displayMedium: heading,
    displaySmall: section,

    // Headlines
    headlineLarge: heading,
    headlineMedium: section,
    headlineSmall: title,

    // Titles
    titleLarge: section,
    titleMedium: title,
    titleSmall: label,

    // Body
    bodyLarge: lead,
    bodyMedium: body,
    bodySmall: paragraph,

    // Labels
    labelLarge: label,
    labelMedium: labelSmall,
    labelSmall: caption,
  );
}