attachmentFromValue static method

Attachment attachmentFromValue(
  1. String s
)

Implementation

static Attachment attachmentFromValue(String s) {
  Attachment? attachment;
  for (Attachment element in Attachment.values) {
    if (s == describeEnum(element)) {
      attachment = element;
    }
  }
  if (attachment == null) {
    throw IllegalParameterException('No enum Attachment $s');
  } else {
    return attachment;
  }
}