getByValue static method

FontStyle? getByValue(
  1. int? i
)

Implementation

static FontStyle? getByValue(int? i) {
  if (i == null) return null;
  try {
    return FontStyle.values.firstWhere((x) => x.value == i);
  } catch (_) {
    return FontStyle.UNKNOWN;
  }
}