parseFontWeight function

FontWeight? parseFontWeight(
  1. String? string
)

sorta like an enum

Implementation

FontWeight? parseFontWeight(String? string) {
  FontWeight? rst;
  FontWeight.values.forEach((element) {
    if (string == element.toJson()) {
      rst = element;
    }
  });
  return rst;
}