fromValue static method

IOSWKDataDetectorTypes? fromValue(
  1. 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;
}