heading2Medium static method
Implementation
static TextStyle heading2Medium(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.fontWeightMedium,
height: AppTypography.mobileLineHeightHeading2 / AppTypography.mobileFontSizeHeading2,
color: color ?? Colors.black,
);
case DeviceType.tablet:
return TextStyle(
fontFamily: fontFamily ?? AppTypography.fontFamily,
fontSize: AppTypography.tabletFontSizeHeading2,
fontWeight: AppTypography.fontWeightMedium,
height: AppTypography.tabletLineHeightHeading2 / AppTypography.tabletFontSizeHeading2,
color: color ?? Colors.black,
);
case DeviceType.desktop:
return TextStyle(
fontFamily: fontFamily ?? AppTypography.fontFamily,
fontSize: AppTypography.desktopFontSizeHeading2,
fontWeight: AppTypography.fontWeightMedium,
height: AppTypography.desktopLineHeightHeading2 / AppTypography.desktopFontSizeHeading2,
color: color ?? Colors.black,
);
}
}