setTextStyle static method

TextStyle setTextStyle({
  1. double? fontSize,
  2. Color? color,
  3. FontWeight? fontWeight,
  4. FontStyle? fontStyle,
  5. double? letterSpacing,
  6. double? height,
})

Implementation

static TextStyle setTextStyle({
  double? fontSize,
  Color? color,
  FontWeight? fontWeight,
  FontStyle? fontStyle,
  double? letterSpacing,
  double? height,
}) {
  switch (HMSRoomLayout.roleLayoutData?.typography?.typography) {
    case 'Roboto':
      return GoogleFonts.roboto(
        fontSize: fontSize,
        color: color,
        fontWeight: fontWeight,
        letterSpacing: letterSpacing,
        height: height,
      );
    case 'Lato':
      return GoogleFonts.lato(
        fontSize: fontSize,
        color: color,
        fontWeight: fontWeight,
        letterSpacing: letterSpacing,
        height: height,
      );
    case 'Montserrat':
      return GoogleFonts.montserrat(
        fontSize: fontSize,
        color: color,
        fontWeight: fontWeight,
        letterSpacing: letterSpacing,
        height: height,
      );
    case 'Open Sans':
      return GoogleFonts.openSans(
        fontSize: fontSize,
        color: color,
        fontWeight: fontWeight,
        letterSpacing: letterSpacing,
        height: height,
      );
    case 'IBM Plex Sans':
      return GoogleFonts.ibmPlexSans(
        fontSize: fontSize,
        color: color,
        fontWeight: fontWeight,
        letterSpacing: letterSpacing,
        height: height,
      );
    default:
      return GoogleFonts.inter(
        fontSize: fontSize,
        color: color,
        fontWeight: fontWeight,
        letterSpacing: letterSpacing,
        height: height,
      );
  }
}