stringToContentType function
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.');
}
}