getFontWeight static method

String getFontWeight(
  1. FontWeight? fontWeight
)

Implementation

static String getFontWeight(FontWeight? fontWeight) {
  if (fontWeight == null) fontWeight = FontWeight.NORMAL;
  switch (fontWeight) {
    case FontWeight.BOLD:
      return "bold";
    case FontWeight.ITALIC:
      return "italic";
    case FontWeight.BOLD_ITALIC:
      return "bold_italic";
    case FontWeight.NORMAL:
    default:
      return "normal";
  }
}