contentTypeFromString function

ContentType contentTypeFromString(
  1. String value
)

Implementation

ContentType contentTypeFromString(String value) {
  return ContentType.values.firstWhere(
      (e) => e.toString().split('.')[1].toUpperCase() == value.toUpperCase());
}