bodyBold static method

TextStyle bodyBold(
  1. BuildContext context, {
  2. String? fontFamily,
  3. Color? color,
})

Implementation

static TextStyle bodyBold(BuildContext context, {String? fontFamily, Color? color}) {
  final deviceType = ResponsiveHelper.getDeviceType(context);
  switch (deviceType) {
    case DeviceType.mobile:
      return TextStyle(
        fontFamily: fontFamily ?? AppTypography.fontFamily,
        fontSize: AppTypography.mobileFontSizeBody,
        fontWeight: AppTypography.fontWeightBold,
        height: AppTypography.mobileLineHeightBody / AppTypography.mobileFontSizeBody,
        color: color ?? Colors.black,
      );
    case DeviceType.tablet:
      return TextStyle(
        fontFamily: fontFamily ?? AppTypography.fontFamily,
        fontSize: AppTypography.tabletFontSizeBody,
        fontWeight: AppTypography.fontWeightBold,
        height: AppTypography.tabletLineHeightBody / AppTypography.tabletFontSizeBody,
        color: color ?? Colors.black,
      );
    case DeviceType.desktop:
      return TextStyle(
        fontFamily: fontFamily ?? AppTypography.fontFamily,
        fontSize: AppTypography.desktopFontSizeBody,
        fontWeight: AppTypography.fontWeightBold,
        height: AppTypography.desktopLineHeightBody / AppTypography.desktopFontSizeBody,
        color: color ?? Colors.black,
      );
  }
}