generateFontWidgetByString static method
将标签字体转为合适的字体
Implementation
static FontWeight generateFontWidgetByString(String fontWeight) {
FontWeight defaultWeight = FontWeight.normal;
switch (fontWeight) {
case 'Bold':
defaultWeight = FontWeight.w600;
break;
case 'Medium':
defaultWeight = FontWeight.w500;
break;
case 'Light':
defaultWeight = FontWeight.w300;
break;
}
return defaultWeight;
}