parseFontWeight function
Implementation
FontWeight? parseFontWeight(String? value) {
if (value != null && value.isNotEmpty) {
switch (value) {
case "thin":
case "100":
case "w100":
return FontWeight.w100;
case "extraLight":
case "200":
case "w200":
return FontWeight.w200;
case "light":
case "300":
case "w300":
return FontWeight.w300;
case "regular":
case "normal":
case "400":
case 'w400':
return FontWeight.w400;
case "medium":
case "500":
case "w500":
return FontWeight.w500;
case "semiBold":
case "600":
case 'w600':
return FontWeight.w600;
case "bold":
case "700":
case "w700":
return FontWeight.w700;
case "extraBold":
case "800":
case "w800":
return FontWeight.w800;
case "black":
case "900":
case "w900":
return FontWeight.w900;
}
}
return null;
}