fromIndex static method

KeyUsage? fromIndex(
  1. int? value
)

Implementation

static KeyUsage? fromIndex(int? value) {
  if (value != null) {
    try {
      return KeyUsage.values
          .firstWhere((element) => element.toValue() == value);
    } catch (e) {
      return null;
    }
  }
  return null;
}