createGBTextTheme function
Creates default TextTheme for GB UI Kit typography.
Implementation
TextTheme createGBTextTheme([TextTheme? customTextTheme]) {
const defaults = TextTheme(
displayLarge: TextStyle(fontSize: 34, fontWeight: FontWeight.bold),
displayMedium: TextStyle(fontSize: 24, fontWeight: FontWeight.w400),
displaySmall: TextStyle(fontSize: 20, fontWeight: FontWeight.w400),
headlineMedium: TextStyle(fontSize: 19, fontWeight: FontWeight.w400),
headlineSmall: TextStyle(fontSize: 18, fontWeight: FontWeight.w400),
titleLarge: TextStyle(fontSize: 16, fontWeight: FontWeight.w400),
titleMedium: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
titleSmall: TextStyle(fontSize: 14, fontWeight: FontWeight.bold),
bodyLarge: TextStyle(fontSize: 16, fontWeight: FontWeight.w400),
bodyMedium: TextStyle(fontSize: 14, fontWeight: FontWeight.w400),
labelLarge: TextStyle(fontSize: 14, fontWeight: FontWeight.bold),
bodySmall: TextStyle(fontSize: 12, fontWeight: FontWeight.w400),
labelSmall: TextStyle(fontSize: 10, fontWeight: FontWeight.w400),
);
// Values set in [customTextTheme] take precedence over the GB defaults (as in v3).
return defaults.merge(customTextTheme);
}