captionBold static method

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

Implementation

static TextStyle captionBold(BuildContext context, {String? fontFamily, Color? color}) {
  final deviceType = ResponsiveHelper.getDeviceType(context);
  switch (deviceType) {
    case DeviceType.mobile:
      return TextStyle(
        fontFamily: fontFamily ?? AppTypography.fontFamily,
        fontSize: AppTypography.mobileFontSizeCaption,
        fontWeight: AppTypography.fontWeightBold,
        height: AppTypography.mobileLineHeightCaption / AppTypography.mobileFontSizeCaption,
        color: color ?? Colors.black,
      );
    case DeviceType.tablet:
      return TextStyle(
        fontFamily: fontFamily ?? AppTypography.fontFamily,
        fontSize: AppTypography.tabletFontSizeCaption,
        fontWeight: AppTypography.fontWeightBold,
        height: AppTypography.tabletLineHeightCaption / AppTypography.tabletFontSizeCaption,
        color: color ?? Colors.black,
      );
    case DeviceType.desktop:
      return TextStyle(
        fontFamily: fontFamily ?? AppTypography.fontFamily,
        fontSize: AppTypography.desktopFontSizeCaption,
        fontWeight: AppTypography.fontWeightBold,
        height: AppTypography.desktopLineHeightCaption / AppTypography.desktopFontSizeCaption,
        color: color ?? Colors.black,
      );
  }
}