popupFontWeight function
weight 100..900 → FontWeight.
Implementation
FontWeight? popupFontWeight(Object? w) {
if (w is! num) return null;
final i = (w / 100).round().clamp(1, 9) - 1;
return FontWeight.values[i];
}
weight 100..900 → FontWeight.
FontWeight? popupFontWeight(Object? w) {
if (w is! num) return null;
final i = (w / 100).round().clamp(1, 9) - 1;
return FontWeight.values[i];
}