fromValue static method
Returns the ResourceCode associated with the given value.
Throws an error if no match is found.
Implementation
static ResourceCode fromValue(int? val, {ResourceCode? orElse}) {
return values.firstWhere((element) => element.value == val,
orElse: orElse == null ? null : () => orElse);
}