fromString static method

ResourceType fromString(
  1. String value
)

Get a ResourceType from a given string value.

Implementation

static ResourceType fromString(String value) {
  return values.firstWhere(
    (type) => type.value == value,
    orElse: () => device,
  );
}