getTextThemeData function
Implementation
TextTheme getTextThemeData(BuildContext context) {
// this includes xs and sm screens
final isMobile = context.isScreenSmallerThan(S360fScreenSize.md);
return TextTheme(
displayLarge: GoogleFonts.openSans(
fontSize: isMobile ? 48 : 57,
height: 1.12,
),
displayMedium: GoogleFonts.openSans(
fontSize: isMobile ? 38 : 48,
height: 1.25,
),
displaySmall: GoogleFonts.openSans(
fontSize: isMobile ? 30 : 38,
height: 1.25,
),
headlineLarge: GoogleFonts.openSans(
fontSize: isMobile ? 32 : 36,
height: 1.25,
),
headlineMedium: GoogleFonts.openSans(
fontSize: isMobile ? 24 : 30,
height: 1.33,
),
headlineSmall: GoogleFonts.openSans(
fontSize: isMobile ? 20 : 24,
height: 1.33,
),
titleLarge: GoogleFonts.openSans(
fontSize: isMobile ? 18 : 20,
height: 1.33,
),
titleMedium: GoogleFonts.openSans(fontSize: 18, height: 1.56),
titleSmall: GoogleFonts.openSans(fontSize: 14, height: 1.5),
bodyLarge: GoogleFonts.openSans(fontSize: isMobile ? 16 : 18, height: 1.33),
bodyMedium: GoogleFonts.openSans(fontSize: 16, height: 1.5),
bodySmall: GoogleFonts.openSans(fontSize: 14, height: 1.14),
labelLarge: GoogleFonts.openSans(fontSize: 14, height: 1.71),
labelMedium: GoogleFonts.openSans(fontSize: 12, height: 1.33),
labelSmall: GoogleFonts.openSans(fontSize: 12, height: 1.33),
);
}