exportFontWeight function

String exportFontWeight(
  1. FontWeight? fontWeight
)

Implementation

String exportFontWeight(FontWeight? fontWeight) {
  String rt = "normal";
  if (fontWeight == FontWeight.w100) {
    rt = "w100";
  }
  if (fontWeight == FontWeight.w200) {
    rt = "w200";
  }
  if (fontWeight == FontWeight.w300) {
    rt = "w300";
  }
  if (fontWeight == FontWeight.w400) {
    rt = "w400";
  }
  if (fontWeight == FontWeight.w500) {
    rt = "w500";
  }
  if (fontWeight == FontWeight.w600) {
    rt = "w600";
  }
  if (fontWeight == FontWeight.w700) {
    rt = "w700";
  }
  if (fontWeight == FontWeight.w800) {
    rt = "w800";
  }
  if (fontWeight == FontWeight.w900) {
    rt = "w900";
  }
  return rt;
}