fromString static method

RicochetResourceType fromString(
  1. String value
)

Parse from string representation

Implementation

static RicochetResourceType fromString(String value) {
  switch (value) {
    case 'doc':
      return RicochetResourceType.doc;
    case 'mailbox':
      return RicochetResourceType.mailbox;
    default:
      throw FormatException('Invalid resource type: $value');
  }
}