isValidFontWeightValue static method

bool isValidFontWeightValue(
  1. String value
)

Implementation

static bool isValidFontWeightValue(String value) {
  double? weight = CSSNumber.parseNumber(value);
  if (weight != null) {
    return weight >= 1 && weight <= 1000;
  } else {
    return value == 'normal' || value == 'bold' || value == 'lighter' || value == 'bolder';
  }
}