fromValue static method

DataDetectorTypes? fromValue(
  1. String? value
)

Gets a possible DataDetectorTypes instance from String value.

Implementation

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