fromValue static method

IOSWKDataDetectorTypes? fromValue(
  1. String? value
)

Gets a possible IOSWKDataDetectorTypes instance from String value.

Implementation

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