toFontWeight static method

FontWeight toFontWeight(
  1. EliudFontWeight? eliudFontWeight
)

Implementation

static FontWeight toFontWeight(EliudFontWeight? eliudFontWeight) {
  if (eliudFontWeight == null) return FontWeight.w400;
  switch (eliudFontWeight) {
    case EliudFontWeight.thin:
      return FontWeight.w100;
    case EliudFontWeight.extraLight:
      return FontWeight.w200;
    case EliudFontWeight.light:
      return FontWeight.w300;
    case EliudFontWeight.normal:
      return FontWeight.w400;
    case EliudFontWeight.medium:
      return FontWeight.w500;
    case EliudFontWeight.semiBold:
      return FontWeight.w600;
    case EliudFontWeight.bold:
      return FontWeight.w700;
    case EliudFontWeight.extraBold:
      return FontWeight.w800;
    case EliudFontWeight.mostThick:
      return FontWeight.w900;
    case EliudFontWeight.unknown:
      return FontWeight.w900;
  }
}