getByValue static method

CustomButtonTag? getByValue(
  1. int? i
)

Implementation

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