heading2Semibold static method

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

Implementation

static TextStyle heading2Semibold(BuildContext context, {String? fontFamily, Color? color}) {
  final deviceType = ResponsiveHelper.getDeviceType(context);
  switch (deviceType) {
    case DeviceType.mobile:
      return TextStyle(
        fontFamily: fontFamily ?? AppTypography.fontFamily,
        fontSize: AppTypography.mobileFontSizeHeading2,
        fontWeight: AppTypography.fontWeightSemibold,
        height: AppTypography.mobileLineHeightHeading2 / AppTypography.mobileFontSizeHeading2,
        color: color ?? Colors.black,
      );
    case DeviceType.tablet:
      return TextStyle(
        fontFamily: fontFamily ?? AppTypography.fontFamily,
        fontSize: AppTypography.tabletFontSizeHeading2,
        fontWeight: AppTypography.fontWeightSemibold,
        height: AppTypography.tabletLineHeightHeading2 / AppTypography.tabletFontSizeHeading2,
        color: color ?? Colors.black,
      );
    case DeviceType.desktop:
      return TextStyle(
        fontFamily: fontFamily ?? AppTypography.fontFamily,
        fontSize: AppTypography.desktopFontSizeHeading2,
        fontWeight: AppTypography.fontWeightSemibold,
        height: AppTypography.desktopLineHeightHeading2 / AppTypography.desktopFontSizeHeading2,
        color: color ?? Colors.black,
      );
  }
}