fromValue static method

WebArchiveFormat? fromValue(
  1. String? value
)

Gets a possible WebArchiveFormat instance from String value.

Implementation

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