mediaTypeFromString method

MediaType mediaTypeFromString()

Implementation

MediaType mediaTypeFromString() {
  switch (this) {
    case 'movement':
      return MediaType.movement;
    case 'documentFront':
      return MediaType.documentFront;
    case 'documentBack':
      return MediaType.documentBack;
    default:
      throw Exception('Invalid media type $this');
  }
}