fontWeight property

FontWeight get fontWeight

Implementation

FontWeight get fontWeight {
  final x = value >= 0 && value <= 1 ? value * 100 : value;
  if (x >= 900) {
    return FontWeight.w900;
  } else if (x >= 800) {
    return FontWeight.w800;
  } else if (x >= 700) {
    return FontWeight.w700;
  } else if (x >= 600) {
    return FontWeight.w600;
  } else if (x >= 500) {
    return FontWeight.w500;
  } else if (x >= 400) {
    return FontWeight.w400;
  } else if (x >= 300) {
    return FontWeight.w300;
  } else if (x >= 200) {
    return FontWeight.w200;
  } else if (x >= 100) {
    return FontWeight.w100;
  } else {
    return FontWeight.normal;
  }
}