stringToContentType function

PostContentType stringToContentType(
  1. String s
)

Implementation

PostContentType stringToContentType(String s) {
  switch (s) {
    case 'any':
      return PostContentType.any;
    case 'self':
      return PostContentType.self;
    case 'link':
      return PostContentType.link;
    default:
      throw DRAWInternalError('Invalid Post Content type: $s.');
  }
}