fromValue static method

WebsiteDataType? fromValue(
  1. String? value
)

Gets a possible WebsiteDataType instance from String value.

Implementation

static WebsiteDataType? fromValue(String? value) {
  if (value != null) {
    try {
      return WebsiteDataType.values
          .firstWhere((element) => element.toValue() == value);
    } catch (e) {
      return null;
    }
  }
  return null;
}